Skip to content

Create a module type for initializers #138

@nfroidure

Description

@nfroidure

Once the following issue is resolved: microsoft/TypeScript#38511 🤞

We will be able to create types for module embedding an initializer. It could look like this:

export type ServiceInitializerModule {
  default: ServiceInitializer;
} & ServiceInputProperties;

// In a knifecycle.d.ts file
declare module '*.service.ts' implements ServiceInitializerModule;
declare module '*.services.ts' implements Record<string, ServiceInitializerModule>;

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions