nfroidure / nfroidure/knifecycle
Create a module type for initializers
Open
@nfroidure is already working on this.
Since Dec 3, 2024.
enhancement
- Dominant language
- TypeScript
- Stars
- 34
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Once the following issue is resolved: https://github.com/microsoft/TypeScript/issues/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>;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.