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

feat(typescript): allow generic names starting with "K" #116

Merged
merged 1 commit into from
Sep 27, 2019

Conversation

francoischalifour
Copy link
Member

Description

We accept only generic type names starting with "T" but sometimes, accepting "K" also makes sense. This is the case when using the TypeScript keyword keyof:

type StateToWidgets = {
  [KParameter in keyof IndexUiState]: Array<Widget['$$type']>;
};

Related

We accept only generic type names starting with "T" but so
metimes, accepting "K" also makes sense. This is the case when
using the TypeScript keyword `keyof`:

```ts
type StateToWidgets = {
  [KParameter in keyof IndexUiState]: Array<Widget['$$type']>;
};
```

See https://www.typescriptlang.org/docs/handbook/release-n
otes/typescript-2-1.html#example
@francoischalifour francoischalifour merged commit 2148fe4 into master Sep 27, 2019
@francoischalifour francoischalifour deleted the feat/typescript-generic-name-K branch September 27, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants