Commit 961978f3 authored by Julien Puydt's avatar Julien Puydt

New upstream version 3.5.3

parent c22f37fb
This diff is collapsed.
......@@ -60,7 +60,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
var ts;
(function (ts) {
ts.versionMajorMinor = "3.5";
ts.version = ts.versionMajorMinor + ".2";
ts.version = ts.versionMajorMinor + ".3";
})(ts || (ts = {}));
(function (ts) {
ts.emptyArray = [];
......@@ -67528,18 +67528,24 @@ var ts;
case 240: {
var clean = cleanup(ts.updateFunctionDeclaration(input, undefined, ensureModifiers(input, isPrivate), undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type), undefined));
if (clean && resolver.isExpandoFunctionDeclaration(input)) {
var declarations = ts.mapDefined(resolver.getPropertiesOfContainerFunction(input), function (p) {
var props = resolver.getPropertiesOfContainerFunction(input);
var fakespace_1 = ts.createModuleDeclaration(undefined, undefined, clean.name || ts.createIdentifier("_default"), ts.createModuleBlock([]), 16);
fakespace_1.flags ^= 8;
fakespace_1.parent = enclosingDeclaration;
fakespace_1.locals = ts.createSymbolTable(props);
fakespace_1.symbol = props[0].parent;
var declarations = ts.mapDefined(props, function (p) {
if (!ts.isPropertyAccessExpression(p.valueDeclaration)) {
return undefined;
}
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace_1, declarationEmitNodeBuilderFlags, symbolTracker);
getSymbolAccessibilityDiagnostic = oldDiag;
var varDecl = ts.createVariableDeclaration(ts.unescapeLeadingUnderscores(p.escapedName), type, undefined);
return ts.createVariableStatement(undefined, ts.createVariableDeclarationList([varDecl]));
});
var namespaceDecl = ts.createModuleDeclaration(undefined, ensureModifiers(input, isPrivate), input.name, ts.createModuleBlock(declarations), 16);
if (!ts.hasModifier(clean, 513)) {
if (!ts.hasModifier(clean, 512)) {
return [clean, namespaceDecl];
}
var modifiers = ts.createModifiersFromModifierFlags((ts.getModifierFlags(clean) & ~513) | 2);
......@@ -87,7 +87,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.5";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".2";
ts.version = ts.versionMajorMinor + ".3";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
......@@ -83053,18 +83053,24 @@ var ts;
/*asteriskToken*/ undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
/*body*/ undefined));
if (clean && resolver.isExpandoFunctionDeclaration(input)) {
var declarations = ts.mapDefined(resolver.getPropertiesOfContainerFunction(input), function (p) {
var props = resolver.getPropertiesOfContainerFunction(input);
var fakespace_1 = ts.createModuleDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, clean.name || ts.createIdentifier("_default"), ts.createModuleBlock([]), 16 /* Namespace */);
fakespace_1.flags ^= 8 /* Synthesized */; // unset synthesized so it is usable as an enclosing declaration
fakespace_1.parent = enclosingDeclaration;
fakespace_1.locals = ts.createSymbolTable(props);
fakespace_1.symbol = props[0].parent;
var declarations = ts.mapDefined(props, function (p) {
if (!ts.isPropertyAccessExpression(p.valueDeclaration)) {
return undefined;
}
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace_1, declarationEmitNodeBuilderFlags, symbolTracker);
getSymbolAccessibilityDiagnostic = oldDiag;
var varDecl = ts.createVariableDeclaration(ts.unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined);
return ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([varDecl]));
});
var namespaceDecl = ts.createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name, ts.createModuleBlock(declarations), 16 /* Namespace */);
if (!ts.hasModifier(clean, 513 /* ExportDefault */)) {
if (!ts.hasModifier(clean, 512 /* Default */)) {
return [clean, namespaceDecl];
}
var modifiers = ts.createModifiersFromModifierFlags((ts.getModifierFlags(clean) & ~513 /* ExportDefault */) | 2 /* Ambient */);
......@@ -86,7 +86,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.5";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".2";
ts.version = ts.versionMajorMinor + ".3";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
......@@ -83052,18 +83052,24 @@ var ts;
/*asteriskToken*/ undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
/*body*/ undefined));
if (clean && resolver.isExpandoFunctionDeclaration(input)) {
var declarations = ts.mapDefined(resolver.getPropertiesOfContainerFunction(input), function (p) {
var props = resolver.getPropertiesOfContainerFunction(input);
var fakespace_1 = ts.createModuleDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, clean.name || ts.createIdentifier("_default"), ts.createModuleBlock([]), 16 /* Namespace */);
fakespace_1.flags ^= 8 /* Synthesized */; // unset synthesized so it is usable as an enclosing declaration
fakespace_1.parent = enclosingDeclaration;
fakespace_1.locals = ts.createSymbolTable(props);
fakespace_1.symbol = props[0].parent;
var declarations = ts.mapDefined(props, function (p) {
if (!ts.isPropertyAccessExpression(p.valueDeclaration)) {
return undefined;
}
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace_1, declarationEmitNodeBuilderFlags, symbolTracker);
getSymbolAccessibilityDiagnostic = oldDiag;
var varDecl = ts.createVariableDeclaration(ts.unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined);
return ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([varDecl]));
});
var namespaceDecl = ts.createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name, ts.createModuleBlock(declarations), 16 /* Namespace */);
if (!ts.hasModifier(clean, 513 /* ExportDefault */)) {
if (!ts.hasModifier(clean, 512 /* Default */)) {
return [clean, namespaceDecl];
}
var modifiers = ts.createModifiersFromModifierFlags((ts.getModifierFlags(clean) & ~513 /* ExportDefault */) | 2 /* Ambient */);
......@@ -75,7 +75,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.5";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".2";
ts.version = ts.versionMajorMinor + ".3";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
......@@ -83041,18 +83041,24 @@ var ts;
/*asteriskToken*/ undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
/*body*/ undefined));
if (clean && resolver.isExpandoFunctionDeclaration(input)) {
var declarations = ts.mapDefined(resolver.getPropertiesOfContainerFunction(input), function (p) {
var props = resolver.getPropertiesOfContainerFunction(input);
var fakespace_1 = ts.createModuleDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, clean.name || ts.createIdentifier("_default"), ts.createModuleBlock([]), 16 /* Namespace */);
fakespace_1.flags ^= 8 /* Synthesized */; // unset synthesized so it is usable as an enclosing declaration
fakespace_1.parent = enclosingDeclaration;
fakespace_1.locals = ts.createSymbolTable(props);
fakespace_1.symbol = props[0].parent;
var declarations = ts.mapDefined(props, function (p) {
if (!ts.isPropertyAccessExpression(p.valueDeclaration)) {
return undefined;
}
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace_1, declarationEmitNodeBuilderFlags, symbolTracker);
getSymbolAccessibilityDiagnostic = oldDiag;
var varDecl = ts.createVariableDeclaration(ts.unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined);
return ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([varDecl]));
});
var namespaceDecl = ts.createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name, ts.createModuleBlock(declarations), 16 /* Namespace */);
if (!ts.hasModifier(clean, 513 /* ExportDefault */)) {
if (!ts.hasModifier(clean, 512 /* Default */)) {
return [clean, namespaceDecl];
}
var modifiers = ts.createModifiersFromModifierFlags((ts.getModifierFlags(clean) & ~513 /* ExportDefault */) | 2 /* Ambient */);
......@@ -75,7 +75,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.5";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".2";
ts.version = ts.versionMajorMinor + ".3";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
......@@ -83041,18 +83041,24 @@ var ts;
/*asteriskToken*/ undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
/*body*/ undefined));
if (clean && resolver.isExpandoFunctionDeclaration(input)) {
var declarations = ts.mapDefined(resolver.getPropertiesOfContainerFunction(input), function (p) {
var props = resolver.getPropertiesOfContainerFunction(input);
var fakespace_1 = ts.createModuleDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, clean.name || ts.createIdentifier("_default"), ts.createModuleBlock([]), 16 /* Namespace */);
fakespace_1.flags ^= 8 /* Synthesized */; // unset synthesized so it is usable as an enclosing declaration
fakespace_1.parent = enclosingDeclaration;
fakespace_1.locals = ts.createSymbolTable(props);
fakespace_1.symbol = props[0].parent;
var declarations = ts.mapDefined(props, function (p) {
if (!ts.isPropertyAccessExpression(p.valueDeclaration)) {
return undefined;
}
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace_1, declarationEmitNodeBuilderFlags, symbolTracker);
getSymbolAccessibilityDiagnostic = oldDiag;
var varDecl = ts.createVariableDeclaration(ts.unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined);
return ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([varDecl]));
});
var namespaceDecl = ts.createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name, ts.createModuleBlock(declarations), 16 /* Namespace */);
if (!ts.hasModifier(clean, 513 /* ExportDefault */)) {
if (!ts.hasModifier(clean, 512 /* Default */)) {
return [clean, namespaceDecl];
}
var modifiers = ts.createModifiersFromModifierFlags((ts.getModifierFlags(clean) & ~513 /* ExportDefault */) | 2 /* Ambient */);
......@@ -76,7 +76,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.5";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".2";
ts.version = ts.versionMajorMinor + ".3";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
......@@ -83042,18 +83042,24 @@ var ts;
/*asteriskToken*/ undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
/*body*/ undefined));
if (clean && resolver.isExpandoFunctionDeclaration(input)) {
var declarations = ts.mapDefined(resolver.getPropertiesOfContainerFunction(input), function (p) {
var props = resolver.getPropertiesOfContainerFunction(input);
var fakespace_1 = ts.createModuleDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, clean.name || ts.createIdentifier("_default"), ts.createModuleBlock([]), 16 /* Namespace */);
fakespace_1.flags ^= 8 /* Synthesized */; // unset synthesized so it is usable as an enclosing declaration
fakespace_1.parent = enclosingDeclaration;
fakespace_1.locals = ts.createSymbolTable(props);
fakespace_1.symbol = props[0].parent;
var declarations = ts.mapDefined(props, function (p) {
if (!ts.isPropertyAccessExpression(p.valueDeclaration)) {
return undefined;
}
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
var type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace_1, declarationEmitNodeBuilderFlags, symbolTracker);
getSymbolAccessibilityDiagnostic = oldDiag;
var varDecl = ts.createVariableDeclaration(ts.unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined);
return ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([varDecl]));
});
var namespaceDecl = ts.createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name, ts.createModuleBlock(declarations), 16 /* Namespace */);
if (!ts.hasModifier(clean, 513 /* ExportDefault */)) {
if (!ts.hasModifier(clean, 512 /* Default */)) {
return [clean, namespaceDecl];
}
var modifiers = ts.createModifiersFromModifierFlags((ts.getModifierFlags(clean) & ~513 /* ExportDefault */) | 2 /* Ambient */);
......@@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "3.5.2",
"version": "3.5.3",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
......
......@@ -3,7 +3,7 @@ namespace ts {
// If changing the text in this section, be sure to test `configureNightly` too.
export const versionMajorMinor = "3.5";
/** The version of the TypeScript compiler release */
export const version = `${versionMajorMinor}.2`;
export const version = `${versionMajorMinor}.3`;
}
namespace ts {
......
......@@ -1036,19 +1036,25 @@ namespace ts {
/*body*/ undefined
));
if (clean && resolver.isExpandoFunctionDeclaration(input)) {
const declarations = mapDefined(resolver.getPropertiesOfContainerFunction(input), p => {
const props = resolver.getPropertiesOfContainerFunction(input);
const fakespace = createModuleDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, clean.name || createIdentifier("_default"), createModuleBlock([]), NodeFlags.Namespace);
fakespace.flags ^= NodeFlags.Synthesized; // unset synthesized so it is usable as an enclosing declaration
fakespace.parent = enclosingDeclaration as SourceFile | NamespaceDeclaration;
fakespace.locals = createSymbolTable(props);
fakespace.symbol = props[0].parent!;
const declarations = mapDefined(props, p => {
if (!isPropertyAccessExpression(p.valueDeclaration)) {
return undefined;
}
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
const type = resolver.createTypeOfDeclaration(p.valueDeclaration, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker);
getSymbolAccessibilityDiagnostic = oldDiag;
const varDecl = createVariableDeclaration(unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined);
return createVariableStatement(/*modifiers*/ undefined, createVariableDeclarationList([varDecl]));
});
const namespaceDecl = createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name!, createModuleBlock(declarations), NodeFlags.Namespace);
if (!hasModifier(clean, ModifierFlags.ExportDefault)) {
if (!hasModifier(clean, ModifierFlags.Default)) {
return [clean, namespaceDecl];
}
......
//// [tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts] ////
//// [foo.ts]
export class Foo {}
//// [index1.ts]
import {Foo} from './foo';
export default function Example() {}
Example.Foo = Foo
//// [index2.ts]
import {Foo} from './foo';
export {Foo};
export default function Example() {}
Example.Foo = Foo
//// [index3.ts]
export class Bar {}
export default function Example() {}
Example.Bar = Bar
//// [index4.ts]
function A() { }
function B() { }
export function C() {
return null;
}
C.A = A;
C.B = B;
//// [foo.js]
"use strict";
exports.__esModule = true;
var Foo = /** @class */ (function () {
function Foo() {
}
return Foo;
}());
exports.Foo = Foo;
//// [index1.js]
"use strict";
exports.__esModule = true;
var foo_1 = require("./foo");
function Example() { }
exports["default"] = Example;
Example.Foo = foo_1.Foo;
//// [index2.js]
"use strict";
exports.__esModule = true;
var foo_1 = require("./foo");
exports.Foo = foo_1.Foo;
function Example() { }
exports["default"] = Example;
Example.Foo = foo_1.Foo;
//// [index3.js]
"use strict";
exports.__esModule = true;
var Bar = /** @class */ (function () {
function Bar() {
}
return Bar;
}());
exports.Bar = Bar;
function Example() { }
exports["default"] = Example;
Example.Bar = Bar;
//// [index4.js]
"use strict";
exports.__esModule = true;
function A() { }
function B() { }
function C() {
return null;
}
exports.C = C;
C.A = A;
C.B = B;
//// [foo.d.ts]
export declare class Foo {
}
//// [index1.d.ts]
declare function Example(): void;
declare namespace Example {
var Foo: typeof import("./foo").Foo;
}
export default Example;
//// [index2.d.ts]
import { Foo } from './foo';
export { Foo };
declare function Example(): void;
declare namespace Example {
var Foo: typeof import("./foo").Foo;
}
export default Example;
//// [index3.d.ts]
export declare class Bar {
}
declare function Example(): void;
declare namespace Example {
var Bar: typeof import("./index3").Bar;
}
export default Example;
//// [index4.d.ts]
export declare function C(): any;
export declare namespace C {
var A: () => void;
var B: () => void;
}
=== tests/cases/compiler/foo.ts ===
export class Foo {}
>Foo : Symbol(Foo, Decl(foo.ts, 0, 0))
=== tests/cases/compiler/index1.ts ===
import {Foo} from './foo';
>Foo : Symbol(Foo, Decl(index1.ts, 0, 8))
export default function Example() {}
>Example : Symbol(Example, Decl(index1.ts, 0, 26), Decl(index1.ts, 1, 36))
Example.Foo = Foo
>Example.Foo : Symbol(Example.Foo, Decl(index1.ts, 1, 36))
>Example : Symbol(Example, Decl(index1.ts, 0, 26), Decl(index1.ts, 1, 36))
>Foo : Symbol(Example.Foo, Decl(index1.ts, 1, 36))
>Foo : Symbol(Foo, Decl(index1.ts, 0, 8))
=== tests/cases/compiler/index2.ts ===
import {Foo} from './foo';
>Foo : Symbol(Foo, Decl(index2.ts, 0, 8))
export {Foo};
>Foo : Symbol(Foo, Decl(index2.ts, 1, 8))
export default function Example() {}
>Example : Symbol(Example, Decl(index2.ts, 1, 13), Decl(index2.ts, 2, 36))
Example.Foo = Foo
>Example.Foo : Symbol(Example.Foo, Decl(index2.ts, 2, 36))
>Example : Symbol(Example, Decl(index2.ts, 1, 13), Decl(index2.ts, 2, 36))
>Foo : Symbol(Example.Foo, Decl(index2.ts, 2, 36))
>Foo : Symbol(Foo, Decl(index2.ts, 0, 8))
=== tests/cases/compiler/index3.ts ===
export class Bar {}
>Bar : Symbol(Bar, Decl(index3.ts, 0, 0))
export default function Example() {}
>Example : Symbol(Example, Decl(index3.ts, 0, 19), Decl(index3.ts, 1, 36))
Example.Bar = Bar
>Example.Bar : Symbol(Example.Bar, Decl(index3.ts, 1, 36))
>Example : Symbol(Example, Decl(index3.ts, 0, 19), Decl(index3.ts, 1, 36))
>Bar : Symbol(Example.Bar, Decl(index3.ts, 1, 36))
>Bar : Symbol(Bar, Decl(index3.ts, 0, 0))
=== tests/cases/compiler/index4.ts ===
function A() { }
>A : Symbol(A, Decl(index4.ts, 0, 0))
function B() { }
>B : Symbol(B, Decl(index4.ts, 0, 17))
export function C() {
>C : Symbol(C, Decl(index4.ts, 2, 16), Decl(index4.ts, 6, 1))
return null;
}
C.A = A;
>C.A : Symbol(C.A, Decl(index4.ts, 6, 1))
>C : Symbol(C, Decl(index4.ts, 2, 16), Decl(index4.ts, 6, 1))
>A : Symbol(C.A, Decl(index4.ts, 6, 1))
>A : Symbol(A, Decl(index4.ts, 0, 0))
C.B = B;
>C.B : Symbol(C.B, Decl(index4.ts, 8, 8))
>C : Symbol(C, Decl(index4.ts, 2, 16), Decl(index4.ts, 6, 1))
>B : Symbol(C.B, Decl(index4.ts, 8, 8))
>B : Symbol(B, Decl(index4.ts, 0, 17))
=== tests/cases/compiler/foo.ts ===
export class Foo {}
>Foo : Foo
=== tests/cases/compiler/index1.ts ===
import {Foo} from './foo';
>Foo : typeof Foo
export default function Example() {}
>Example : typeof Example
Example.Foo = Foo
>Example.Foo = Foo : typeof Foo
>Example.Foo : typeof Foo
>Example : typeof Example
>Foo : typeof Foo
>Foo : typeof Foo
=== tests/cases/compiler/index2.ts ===
import {Foo} from './foo';
>Foo : typeof Foo
export {Foo};
>Foo : typeof Foo
export default function Example() {}
>Example : typeof Example
Example.Foo = Foo
>Example.Foo = Foo : typeof Foo
>Example.Foo : typeof Foo
>Example : typeof Example
>Foo : typeof Foo
>Foo : typeof Foo
=== tests/cases/compiler/index3.ts ===
export class Bar {}
>Bar : Bar
export default function Example() {}
>Example : typeof Example
Example.Bar = Bar
>Example.Bar = Bar : typeof Bar
>Example.Bar : typeof Bar
>Example : typeof Example
>Bar : typeof Bar
>Bar : typeof Bar
=== tests/cases/compiler/index4.ts ===
function A() { }
>A : () => void
function B() { }
>B : () => void
export function C() {
>C : typeof C
return null;
>null : null
}
C.A = A;
>C.A = A : () => void
>C.A : () => void
>C : typeof C
>A : () => void
>A : () => void
C.B = B;
>C.B = B : () => void
>C.B : () => void
>C : typeof C
>B : () => void
>B : () => void
// @declaration: true
// @filename: foo.ts
export class Foo {}
// @filename: index1.ts
import {Foo} from './foo';
export default function Example() {}
Example.Foo = Foo
// @filename: index2.ts
import {Foo} from './foo';
export {Foo};
export default function Example() {}
Example.Foo = Foo
// @filename: index3.ts
export class Bar {}
export default function Example() {}
Example.Bar = Bar
// @filename: index4.ts
function A() { }
function B() { }
export function C() {
return null;
}
C.A = A;
C.B = B;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment