Skip to content

Commit

Permalink
fix: drop constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed May 8, 2024
1 parent a3b5e3c commit d8b8052
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
23 changes: 7 additions & 16 deletions projects/demo/src/app/pages/stackblitz/project-files/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"optimization": false,
"outputHashing": "all",
"sourceMap": false,
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"extractLicenses": false,
"vendorChunk": false,
"buildOptimizer": true
"buildOptimizer": false
}
}
},
Expand All @@ -59,25 +59,16 @@

```json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": false,
"declaration": false,
"downlevelIteration": true,
"downlevelIteration": false,
"experimentalDecorators": true,
"module": "es2017",
"target": "es2017",
"module": "es2020",
"target": "es6",
"moduleResolution": "node",
"importHelpers": true,
"typeRoots": ["node_modules/@types"],
"lib": ["esnext", "dom"]
},
"angularCompilerOptions": {
"enableIvy": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
NodeView,
NodeViewProps,
NodeViewRendererOptions,
NodeViewRendererProps,
} from '@tiptap/core';
import type {Node as ProseMirrorNode} from 'prosemirror-model';
import type {Decoration} from 'prosemirror-view';
Expand Down Expand Up @@ -51,19 +50,6 @@ export class TuiNodeView extends NodeView<
renderer!: TuiComponentRenderer<TuiNodeViewNgComponent, NodeViewProps>;
contentDOMElement: HTMLElement | null = null;

/**
* @caretaker note:
* Class constructor NodeView cannot be invoked without 'new'
*/
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
constructor(
component: Type<TuiNodeViewNgComponent>,
props: NodeViewRendererProps,
options?: Partial<TuiNodeViewRendererOptions>,
) {
super(component, props, options);
}

override mount(): void {
const injector = this.options.injector;
const doc = injector.get(DOCUMENT);
Expand Down

0 comments on commit d8b8052

Please sign in to comment.