Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a module type for initializers #138

Open
nfroidure opened this issue Dec 3, 2024 · 0 comments
Open

Create a module type for initializers #138

nfroidure opened this issue Dec 3, 2024 · 0 comments
Assignees

Comments

@nfroidure
Copy link
Owner

nfroidure commented Dec 3, 2024

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>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant