Add TypeName.Generator
This commit is contained in:
parent
c15534f9d5
commit
5145bdf847
2 changed files with 3 additions and 4 deletions
|
|
@ -16,6 +16,7 @@ export const enum TypeName {
|
|||
number = 'number',
|
||||
symbol = 'symbol',
|
||||
Function = 'Function',
|
||||
Generator = 'Generator',
|
||||
GeneratorFunction = 'GeneratorFunction',
|
||||
AsyncFunction = 'AsyncFunction',
|
||||
Observable = 'Observable',
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@ const createDomElement = (element: string) => document.createElement(element);
|
|||
|
||||
interface Test {
|
||||
fixtures: unknown[];
|
||||
|
||||
// Cannot be TypeName because TypeName.GeneratorFunction does not match 'Generator'
|
||||
typename?: TypeName | 'Generator';
|
||||
typename?: TypeName;
|
||||
is(value: unknown): boolean;
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +179,7 @@ const types = new Map<string, Test>([
|
|||
yield 4;
|
||||
})()
|
||||
],
|
||||
typename: 'Generator'
|
||||
typename: TypeName.Generator
|
||||
}],
|
||||
['generatorFunction', {
|
||||
is: is.generatorFunction,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue