-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer type arguments next to typeof operator
- Loading branch information
1 parent
6ae8fcb
commit 2f3b5b9
Showing
7 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
original file | ||
----------------------------------- | ||
type thing = <T extends object>(what: T) => ReturnType<typeof generic<T>> | ||
----------------------------------- | ||
|
||
Grammar: TypeScript.tmLanguage | ||
----------------------------------- | ||
>type thing = <T extends object>(what: T) => ReturnType<typeof generic<T>> | ||
^^^^ | ||
source.ts meta.type.declaration.ts storage.type.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^^^^^ | ||
source.ts meta.type.declaration.ts entity.name.type.alias.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^ | ||
source.ts meta.type.declaration.ts keyword.operator.assignment.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts entity.name.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts | ||
^^^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts storage.modifier.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts | ||
^^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts support.type.builtin.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts punctuation.definition.typeparameters.end.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts | ||
^^^^ | ||
source.ts meta.type.declaration.ts meta.type.function.ts meta.parameters.ts variable.parameter.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts keyword.operator.type.annotation.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts storage.type.function.arrow.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts | ||
^^^^^^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts entity.name.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts | ||
^^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts meta.type.parameters.ts keyword.operator.expression.typeof.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts meta.type.parameters.ts | ||
^^^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts meta.type.parameters.ts variable.other.readwrite.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts meta.type.parameters.ts meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts meta.type.parameters.ts meta.type.parameters.ts entity.name.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts meta.type.parameters.ts meta.type.parameters.ts punctuation.definition.typeparameters.end.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.function.return.ts meta.type.parameters.ts punctuation.definition.typeparameters.end.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
original file | ||
----------------------------------- | ||
export type UseQuery<TData, TVariables> = typeof useQuery<TData, TVariables> | ||
----------------------------------- | ||
|
||
Grammar: TypeScript.tmLanguage | ||
----------------------------------- | ||
>export type UseQuery<TData, TVariables> = typeof useQuery<TData, TVariables> | ||
^^^^^^ | ||
source.ts meta.type.declaration.ts keyword.control.export.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^^^^ | ||
source.ts meta.type.declaration.ts storage.type.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^^^^^^^^ | ||
source.ts meta.type.declaration.ts entity.name.type.alias.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts | ||
^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts entity.name.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts punctuation.separator.comma.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts | ||
^^^^^^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts entity.name.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts punctuation.definition.typeparameters.end.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^ | ||
source.ts meta.type.declaration.ts keyword.operator.assignment.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^^^^^^ | ||
source.ts meta.type.declaration.ts keyword.operator.expression.typeof.ts | ||
^ | ||
source.ts meta.type.declaration.ts | ||
^^^^^^^^ | ||
source.ts meta.type.declaration.ts variable.other.readwrite.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts | ||
^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts entity.name.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts punctuation.separator.comma.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts | ||
^^^^^^^^^^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts entity.name.type.ts | ||
^ | ||
source.ts meta.type.declaration.ts meta.type.parameters.ts punctuation.definition.typeparameters.end.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
type thing = <T extends object>(what: T) => ReturnType<typeof generic<T>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type UseQuery<TData, TVariables> = typeof useQuery<TData, TVariables> |