Skip to content
Merged
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
6 changes: 5 additions & 1 deletion packages/ts-morph/lib/ts-morph.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { errors, StandardizedFilePath, ts } from "@ts-morph/common";
import { errors, ts } from "@ts-morph/common";

/** Holds the compiler options. */
export declare class CompilerOptionsContainer extends SettingsContainer<ts.CompilerOptions> {
Expand Down Expand Up @@ -170,6 +170,10 @@ export declare abstract class SettingsContainer<T extends object> {
onModified(action: () => void): void;
}

/** Nominal type to denote a file path that has been standardized. */
export type StandardizedFilePath = string & {
_standardizedFilePathBrand: undefined;
};
declare const ArgumentError: typeof errors.ArgumentError;
declare const ArgumentNullOrWhitespaceError: typeof errors.ArgumentNullOrWhitespaceError;
declare const ArgumentOutOfRangeError: typeof errors.ArgumentOutOfRangeError;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function getDeclarationFileStatements(mainFile: tsMorph.SourceFile) {
// add imports the typescript compiler api and code block writer files
statements.push({
kind: tsMorph.StructureKind.ImportDeclaration,
namedImports: ["errors", "StandardizedFilePath", "ts"],
namedImports: ["errors", "ts"],
moduleSpecifier: "@ts-morph/common",
});

Expand Down
1 change: 1 addition & 0 deletions packages/ts-morph/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export {
ScriptKind,
ScriptTarget,
SettingsContainer,
type StandardizedFilePath,
SymbolFlags,
SyntaxKind,
ts,
Expand Down
Loading