mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
spelling: typescript
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
@@ -85,7 +85,7 @@ function validateSchema(jsonSchema: unknown): asserts jsonSchema is JSONSchemaTy
|
||||
*
|
||||
* @param mermaidConfigSchema - The input JSON Schema.
|
||||
*/
|
||||
async function generateTypescript(mermaidConfigSchema: JSONSchemaType<MermaidConfig>) {
|
||||
async function generateTypeScript(mermaidConfigSchema: JSONSchemaType<MermaidConfig>) {
|
||||
/**
|
||||
* Replace all usages of `allOf` with `extends`.
|
||||
*
|
||||
@@ -108,7 +108,7 @@ async function generateTypescript(mermaidConfigSchema: JSONSchemaType<MermaidCon
|
||||
}
|
||||
|
||||
/**
|
||||
* For backwards compatibility with older Mermaid Typescript defs,
|
||||
* For backwards compatibility with older Mermaid TypeScript defs,
|
||||
* we need to make all value optional instead of required.
|
||||
*
|
||||
* This is because the `MermaidConfig` type is used as an input, and everything is optional,
|
||||
@@ -197,7 +197,7 @@ async function main() {
|
||||
validateSchema(configJsonSchema);
|
||||
|
||||
// Generate types from JSON Schema
|
||||
await generateTypescript(configJsonSchema);
|
||||
await generateTypeScript(configJsonSchema);
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
|
@@ -610,7 +610,7 @@ describe('mermaidAPI', () => {
|
||||
|
||||
let error: any = { message: '' };
|
||||
try {
|
||||
// @ts-ignore This is a read-only property. Typescript will not allow assignment, but regular javascript might.
|
||||
// @ts-ignore This is a read-only property. TypeScript will not allow assignment, but regular javascript might.
|
||||
mermaidAPI.defaultConfig = config;
|
||||
} catch (e) {
|
||||
error = e;
|
||||
|
Reference in New Issue
Block a user