Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.
Open
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
9 changes: 5 additions & 4 deletions packages/lib/src/generators/dts-modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ export const __version__: string;
const versionedNamespaceIdentifier = `${name}${node.version.split('.')[0].replace(/[^A-z0-9_]/g, '_')}`;
const versionedModuleIdentifier = `${moduleIdentifier}?version=${node.version}`;

const [versionedModuleHeader, versionedModuleSuffix] = [
`declare module "${versionedModuleIdentifier}" {
namespace ${versionedNamespaceIdentifier} {`,
const [versionedModuleDeclaration, versionModuleNamespace, versionedModuleSuffix] = [
`declare module "${versionedModuleIdentifier}" {`,
`namespace ${versionedNamespaceIdentifier} {`,
`};

export default ${versionedNamespaceIdentifier};
Expand All @@ -110,8 +110,9 @@ export const __version__: string;
const output = [
references,
header,
versionedModuleHeader,
versionedModuleDeclaration,
imports,
versionModuleNamespace,
base,
content,
suffix,
Expand Down