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:
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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';
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user