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',
|
number = 'number',
|
||||||
symbol = 'symbol',
|
symbol = 'symbol',
|
||||||
Function = 'Function',
|
Function = 'Function',
|
||||||
|
Generator = 'Generator',
|
||||||
GeneratorFunction = 'GeneratorFunction',
|
GeneratorFunction = 'GeneratorFunction',
|
||||||
AsyncFunction = 'AsyncFunction',
|
AsyncFunction = 'AsyncFunction',
|
||||||
Observable = 'Observable',
|
Observable = 'Observable',
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,7 @@ const createDomElement = (element: string) => document.createElement(element);
|
||||||
|
|
||||||
interface Test {
|
interface Test {
|
||||||
fixtures: unknown[];
|
fixtures: unknown[];
|
||||||
|
typename?: TypeName;
|
||||||
// Cannot be TypeName because TypeName.GeneratorFunction does not match 'Generator'
|
|
||||||
typename?: TypeName | 'Generator';
|
|
||||||
is(value: unknown): boolean;
|
is(value: unknown): boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,7 +179,7 @@ const types = new Map<string, Test>([
|
||||||
yield 4;
|
yield 4;
|
||||||
})()
|
})()
|
||||||
],
|
],
|
||||||
typename: 'Generator'
|
typename: TypeName.Generator
|
||||||
}],
|
}],
|
||||||
['generatorFunction', {
|
['generatorFunction', {
|
||||||
is: is.generatorFunction,
|
is: is.generatorFunction,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue