Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/dtsBundler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,11 @@ function emitAsNamespace(name, moduleSymbol) {
emitAsNamespace("ts", moduleSymbol);

write("export = ts;", WriteTarget.Both);
write("export as namespace ts;", WriteTarget.Both);

const copyrightNotice = fs.readFileSync(path.join(__dirname, "CopyrightNotice.txt"), "utf-8");
const publicContents = copyrightNotice + publicLines.join(newLine);
const internalContents = copyrightNotice + internalLines.join(newLine);
const publicContents = copyrightNotice + publicLines.join(newLine) + newLine;
const internalContents = copyrightNotice + internalLines.join(newLine) + newLine;

if (publicContents.includes("@internal")) {
console.error("Output includes untrimmed @internal nodes!");
Expand Down
3 changes: 2 additions & 1 deletion tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11064,4 +11064,5 @@ declare namespace ts {
*/
function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
}
export = ts;
Comment thread
jakebailey marked this conversation as resolved.
export = ts;
export as namespace ts;
3 changes: 2 additions & 1 deletion tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7194,4 +7194,5 @@ declare namespace ts {
*/
function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
}
export = ts;
export = ts;
export as namespace ts;