@angular/tsc-wrapped
Advanced tools
Comparing version 4.2.3 to 4.2.4
{ | ||
"name": "@angular/tsc-wrapped", | ||
"version": "4.2.3", | ||
"version": "4.2.4", | ||
"description": "Wraps the tsc CLI, allowing extensions.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/angular/angular/blob/master/tools/@angular/tsc-wrapped", |
@@ -340,3 +340,3 @@ "use strict"; | ||
var functionDeclaration = node; | ||
if (isExported(functionDeclaration)) { | ||
if (isExported(functionDeclaration) && functionDeclaration.name) { | ||
if (!metadata) | ||
@@ -343,0 +343,0 @@ metadata = {}; |
@@ -578,5 +578,2 @@ "use strict"; | ||
describe('with interpolations', function () { | ||
function createSource(text) { | ||
return ts.createSourceFile('', text, ts.ScriptTarget.Latest, true); | ||
} | ||
function e(expr, prefix) { | ||
@@ -740,6 +737,17 @@ var source = createSource((prefix || '') + " export let value = " + expr + ";"); | ||
it('should be able to collect a short-hand property value', function () { | ||
var source = ts.createSourceFile('', "\n const children = { f1: 1 };\n export const r = [\n {path: ':locale', children}\n ];\n ", ts.ScriptTarget.Latest, true); | ||
var source = createSource("\n const children = { f1: 1 };\n export const r = [\n {path: ':locale', children}\n ];\n "); | ||
var metadata = collector.getMetadata(source); | ||
expect(metadata.metadata).toEqual({ r: [{ path: ':locale', children: { f1: 1 } }] }); | ||
}); | ||
// #17518 | ||
it('should skip a default function', function () { | ||
var source = createSource("\n export default function () {\n\n const mainRoutes = [\n {name: 'a', abstract: true, component: 'main'},\n\n {name: 'a.welcome', url: '/welcome', component: 'welcome'}\n ];\n\n return mainRoutes;\n\n }"); | ||
var metadata = collector.getMetadata(source); | ||
expect(metadata).toBeUndefined(); | ||
}); | ||
it('should skip a named default export', function () { | ||
var source = createSource("\n function mainRoutes() {\n\n const mainRoutes = [\n {name: 'a', abstract: true, component: 'main'},\n\n {name: 'a.welcome', url: '/welcome', component: 'welcome'}\n ];\n\n return mainRoutes;\n\n }\n\n exports = foo;\n "); | ||
var metadata = collector.getMetadata(source); | ||
expect(metadata).toBeUndefined(); | ||
}); | ||
}); | ||
@@ -806,2 +814,5 @@ function override(fileName, content) { | ||
}; | ||
function createSource(text) { | ||
return ts.createSourceFile('', text, ts.ScriptTarget.Latest, true); | ||
} | ||
//# sourceMappingURL=collector.spec.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 6 instances in 1 package
647182
0
100
5125