1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

TypeScript: Updated compile target, addressed issues

This commit is contained in:
Dan Brown
2025-07-23 15:41:55 +01:00
parent 3b9c0b34ae
commit 2668aae09b
7 changed files with 7 additions and 7 deletions

View File

@ -175,7 +175,7 @@ export type NodeKey = string;
export class LexicalNode {
// Allow us to look up the type including static props
['constructor']!: KlassConstructor<typeof LexicalNode>;
declare ['constructor']: KlassConstructor<typeof LexicalNode>;
/** @internal */
__type: string;
/** @internal */

View File

@ -24,7 +24,7 @@ export interface DecoratorNode<T> {
/** @noInheritDoc */
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export class DecoratorNode<T> extends LexicalNode {
['constructor']!: KlassConstructor<typeof DecoratorNode<T>>;
declare ['constructor']: KlassConstructor<typeof DecoratorNode<T>>;
constructor(key?: NodeKey) {
super(key);
}

View File

@ -55,7 +55,7 @@ export interface ElementNode {
/** @noInheritDoc */
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export class ElementNode extends LexicalNode {
['constructor']!: KlassConstructor<typeof ElementNode>;
declare ['constructor']: KlassConstructor<typeof ElementNode>;
/** @internal */
__first: null | NodeKey;
/** @internal */

View File

@ -22,7 +22,7 @@ export type SerializedLineBreakNode = SerializedLexicalNode;
/** @noInheritDoc */
export class LineBreakNode extends LexicalNode {
['constructor']!: KlassConstructor<typeof LineBreakNode>;
declare ['constructor']: KlassConstructor<typeof LineBreakNode>;
static getType(): string {
return 'linebreak';
}

View File

@ -44,7 +44,7 @@ export type SerializedParagraphNode = Spread<
/** @noInheritDoc */
export class ParagraphNode extends CommonBlockNode {
['constructor']!: KlassConstructor<typeof ParagraphNode>;
declare ['constructor']: KlassConstructor<typeof ParagraphNode>;
/** @internal */
__textFormat: number;
__textStyle: string;

View File

@ -284,7 +284,7 @@ export interface TextNode {
/** @noInheritDoc */
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export class TextNode extends LexicalNode {
['constructor']!: KlassConstructor<typeof TextNode>;
declare ['constructor']: KlassConstructor<typeof TextNode>;
__text: string;
/** @internal */
__format: number;