fix: Tsconfig

This commit is contained in:
Sidharth Vinod
2022-09-08 00:34:52 +05:30
parent e310af7673
commit 3986f48199
2 changed files with 6 additions and 8 deletions

View File

@@ -30,12 +30,14 @@ import { isDetailedError } from './utils';
* ``` * ```
* *
* Renders the mermaid diagrams * Renders the mermaid diagrams
*
* @param config * @param config
* @param nodes * @param nodes
* @param callback * @param callback
*/ */
const init = function ( const init = function (
config?: MermaidConfig, config?: MermaidConfig,
// eslint-disable-next-line no-undef
nodes?: string | HTMLElement | NodeListOf<HTMLElement>, nodes?: string | HTMLElement | NodeListOf<HTMLElement>,
callback?: Function callback?: Function
) { ) {
@@ -54,6 +56,7 @@ const init = function (
const initThrowsErrors = function ( const initThrowsErrors = function (
config?: MermaidConfig, config?: MermaidConfig,
// eslint-disable-next-line no-undef
nodes?: string | HTMLElement | NodeListOf<HTMLElement>, nodes?: string | HTMLElement | NodeListOf<HTMLElement>,
callback?: Function callback?: Function
) { ) {
@@ -156,13 +159,7 @@ if (typeof document !== 'undefined') {
/*! /*!
* Wait for document loaded before starting the execution * Wait for document loaded before starting the execution
*/ */
window.addEventListener( window.addEventListener('load', contentLoaded, false);
'load',
function () {
contentLoaded();
},
false
);
} }
/** /**

View File

@@ -13,7 +13,8 @@
/* Language and Environment */ /* Language and Environment */
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"lib": [ "lib": [
"ES2021" "ES2021",
"DOM"
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */, ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
// "jsx": "preserve", /* Specify what JSX code is generated. */ // "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */