build: switch from npm to yarn

This commit is contained in:
Olivier Combe
2017-09-25 10:10:16 +02:00
committed by Alex Rickabaugh
parent 544a7ad0a5
commit 2d5ef15e08
25 changed files with 6438 additions and 14247 deletions

View File

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

View File

@ -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', () => {