ts-add-js-extension
Version:
Add .js extension to each relative ESM import and export statement in JavaScript file
9 lines (8 loc) • 425 B
TypeScript
declare const separator = "/";
declare const extensions: {
readonly javaScript: readonly [".js", ".mjs", ".jsx"];
readonly typeDefinition: readonly [".d.ts", ".d.mts"];
};
declare const matchJs: (filePath: string) => ".js" | ".mjs" | ".jsx" | undefined;
declare const matchEither: (filePath: string) => ".js" | ".mjs" | ".jsx" | ".d.ts" | ".d.mts" | undefined;
export { extensions, matchJs, matchEither, separator };