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
2022-09-02 16:39:54 -07:00
parent 4139807e75
commit c65142244c
57 changed files with 7850 additions and 7646 deletions

View File

@@ -128,7 +128,7 @@ function createResolvedModuleWithFailedLookupLocations(
}
/** @internal */
interface ModuleResolutionState {
export interface ModuleResolutionState {
host: ModuleResolutionHost;
compilerOptions: CompilerOptions;
traceEnabled: boolean;
@@ -146,7 +146,7 @@ interface ModuleResolutionState {
*
* @internal
*/
interface PackageJsonPathFields {
export interface PackageJsonPathFields {
typings?: string;
types?: string;
typesVersions?: MapLike<MapLike<string[]>>;
@@ -226,7 +226,7 @@ function readPackageJsonTypesVersionsField(jsonContent: PackageJson, state: Modu
}
/** @internal */
interface VersionPaths {
export interface VersionPaths {
version: string;
paths: MapLike<string[]>;
}
@@ -1290,7 +1290,7 @@ export function resolveJSModule(moduleName: string, initialDir: string, host: Mo
}
/** @internal */
enum NodeResolutionFeatures {
export enum NodeResolutionFeatures {
None = 0,
// resolving `#local` names in your own package.json
Imports = 1 << 1,