Add dts bundling

This adds a "small" d.ts bundler script. This script is very basic,
using Node printing to produce its output. Generally speaking, this is
inadvisable as it completely disregards name shadowing, globals, etc.
However, in our case, we don't care about the globals, and we can opt to
restructure our codebase in order to avoid conflict, which we largely
had to do anyway when we were namespaces and everything was in scope.
This commit is contained in:
Jake Bailey committed 2022-11-07 13:35:48 -08:00
1 parent 4139807e75
commit c65142244c
57 files changed
+7850 -7646

No files matched your search

+10 -5
View File
@@ -6,7 +6,8 @@ import { emptyArray, protocol } from "./_namespaces/ts.server";
const lineCollectionCapacity = 4;
interface LineCollection {
/** @internal */
export interface LineCollection {
charCount(): number;
lineCount(): number;
isLeaf(): this is LineLeaf;
@@ -19,7 +20,8 @@ export interface AbsolutePositionAndLineText {
lineText: string | undefined;
}
const enum CharRangeSection {
/** @internal */
export const enum CharRangeSection {
PreStart,
Start,
Entire,
@@ -28,7 +30,8 @@ const enum CharRangeSection {
PostEnd
}
interface LineIndexWalker {
/** @internal */
export interface LineIndexWalker {
goSubtree: boolean;
done: boolean;
leaf(relativeStart: number, relativeLength: number, lineCollection: LineLeaf): void;
@@ -568,7 +571,8 @@ export class LineIndex {
}
}
class LineNode implements LineCollection {
/** @internal */
export class LineNode implements LineCollection {
totalChars = 0;
totalLines = 0;
@@ -819,7 +823,8 @@ class LineNode implements LineCollection {
}
}
class LineLeaf implements LineCollection {
/** @internal */
export class LineLeaf implements LineCollection {
constructor(public text: string) {
}