Skip to content

Commit 2668aae

Browse files
committed
TypeScript: Updated compile target, addressed issues
1 parent 3b9c0b3 commit 2668aae

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

resources/js/wysiwyg/lexical/core/LexicalNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export type NodeKey = string;
175175

176176
export class LexicalNode {
177177
// Allow us to look up the type including static props
178-
['constructor']!: KlassConstructor<typeof LexicalNode>;
178+
declare ['constructor']: KlassConstructor<typeof LexicalNode>;
179179
/** @internal */
180180
__type: string;
181181
/** @internal */

resources/js/wysiwyg/lexical/core/nodes/LexicalDecoratorNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface DecoratorNode<T> {
2424
/** @noInheritDoc */
2525
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
2626
export class DecoratorNode<T> extends LexicalNode {
27-
['constructor']!: KlassConstructor<typeof DecoratorNode<T>>;
27+
declare ['constructor']: KlassConstructor<typeof DecoratorNode<T>>;
2828
constructor(key?: NodeKey) {
2929
super(key);
3030
}

resources/js/wysiwyg/lexical/core/nodes/LexicalElementNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface ElementNode {
5555
/** @noInheritDoc */
5656
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
5757
export class ElementNode extends LexicalNode {
58-
['constructor']!: KlassConstructor<typeof ElementNode>;
58+
declare ['constructor']: KlassConstructor<typeof ElementNode>;
5959
/** @internal */
6060
__first: null | NodeKey;
6161
/** @internal */

resources/js/wysiwyg/lexical/core/nodes/LexicalLineBreakNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type SerializedLineBreakNode = SerializedLexicalNode;
2222

2323
/** @noInheritDoc */
2424
export class LineBreakNode extends LexicalNode {
25-
['constructor']!: KlassConstructor<typeof LineBreakNode>;
25+
declare ['constructor']: KlassConstructor<typeof LineBreakNode>;
2626
static getType(): string {
2727
return 'linebreak';
2828
}

resources/js/wysiwyg/lexical/core/nodes/LexicalParagraphNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export type SerializedParagraphNode = Spread<
4444

4545
/** @noInheritDoc */
4646
export class ParagraphNode extends CommonBlockNode {
47-
['constructor']!: KlassConstructor<typeof ParagraphNode>;
47+
declare ['constructor']: KlassConstructor<typeof ParagraphNode>;
4848
/** @internal */
4949
__textFormat: number;
5050
__textStyle: string;

resources/js/wysiwyg/lexical/core/nodes/LexicalTextNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export interface TextNode {
284284
/** @noInheritDoc */
285285
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
286286
export class TextNode extends LexicalNode {
287-
['constructor']!: KlassConstructor<typeof TextNode>;
287+
declare ['constructor']: KlassConstructor<typeof TextNode>;
288288
__text: string;
289289
/** @internal */
290290
__format: number;

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"include": ["resources/js/**/*"],
33
"exclude": ["resources/js/wysiwyg/lexical/yjs/*"],
44
"compilerOptions": {
5-
"target": "es2019",
5+
"target": "es2022",
66
"module": "commonjs",
77
"rootDir": "./resources/js/",
88
"baseUrl": "./",

0 commit comments

Comments
 (0)