build: switch from npm to yarn
This commit is contained in:

committed by
Alex Rickabaugh

parent
544a7ad0a5
commit
2d5ef15e08
@ -265,13 +265,14 @@ export class MetadataCollector {
|
||||
|
||||
const isExportedIdentifier = (identifier: ts.Identifier) => exportMap.has(identifier.text);
|
||||
const isExported =
|
||||
(node: ts.FunctionDeclaration | ts.ClassDeclaration | ts.InterfaceDeclaration | ts.TypeAliasDeclaration |
|
||||
ts.EnumDeclaration) => isExport(node) || isExportedIdentifier(node.name);
|
||||
(node: ts.FunctionDeclaration | ts.ClassDeclaration | ts.InterfaceDeclaration |
|
||||
ts.TypeAliasDeclaration | ts.EnumDeclaration) =>
|
||||
isExport(node) || isExportedIdentifier(node.name);
|
||||
const exportedIdentifierName = (identifier: ts.Identifier) =>
|
||||
exportMap.get(identifier.text) || identifier.text;
|
||||
const exportedName =
|
||||
(node: ts.FunctionDeclaration | ts.ClassDeclaration | ts.InterfaceDeclaration | ts.TypeAliasDeclaration |
|
||||
ts.EnumDeclaration) => exportedIdentifierName(node.name);
|
||||
(node: ts.FunctionDeclaration | ts.ClassDeclaration | ts.InterfaceDeclaration |
|
||||
ts.TypeAliasDeclaration | ts.EnumDeclaration) => exportedIdentifierName(node.name);
|
||||
|
||||
|
||||
// Predeclare classes and functions
|
||||
|
@ -71,7 +71,7 @@ describe('Collector', () => {
|
||||
const sourceFile = program.getSourceFile('/exported-type.ts');
|
||||
const metadata = collector.getMetadata(sourceFile);
|
||||
expect(metadata).toEqual(
|
||||
{__symbolic: 'module', version: 3, metadata: {SomeType: {__symbolic: 'interface'}}});
|
||||
{__symbolic: 'module', version: 3, metadata: {SomeType: {__symbolic: 'interface'}}});
|
||||
});
|
||||
|
||||
it('should return an interface reference for interfaces', () => {
|
||||
|
Reference in New Issue
Block a user