nfroidure / nfroidure/knifecycle

Create a module type for initializers

Open
#138 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.