diff --git a/packages/mermaid/src/config.ts b/packages/mermaid/src/config.ts index 31f0592de9..9468a3e461 100644 --- a/packages/mermaid/src/config.ts +++ b/packages/mermaid/src/config.ts @@ -230,7 +230,7 @@ const ConfigWarning = { } as const; type ConfigWarningStrings = keyof typeof ConfigWarning; -const issuedWarnings: { [key in ConfigWarningStrings]?: boolean } = {}; +const issuedWarnings: Partial> = {}; const issueWarning = (warning: ConfigWarningStrings) => { if (issuedWarnings[warning]) { return; diff --git a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts index b3ef55ec69..2ae000f697 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts @@ -104,9 +104,7 @@ export const isValidArchitectureDirectionPair = function ( return x !== 'LL' && x !== 'RR' && x !== 'TT' && x !== 'BB'; }; -export type ArchitectureDirectionPairMap = { - [key in ArchitectureDirectionPair]?: string; -}; +export type ArchitectureDirectionPairMap = Partial>; /** * Creates a pair of the directions of each side of an edge. This function should be used instead of manually creating it to ensure that the source is always the first character.