Add TypeName.Generator

This commit is contained in:
Adam Babcock 2019-04-19 12:41:54 -05:00
parent c15534f9d5
commit 5145bdf847
2 changed files with 3 additions and 4 deletions

View file

@ -16,6 +16,7 @@ export const enum TypeName {
number = 'number',
symbol = 'symbol',
Function = 'Function',
Generator = 'Generator',
GeneratorFunction = 'GeneratorFunction',
AsyncFunction = 'AsyncFunction',
Observable = 'Observable',

View file

@ -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,