thislessFunctionsNotContextSensitive3.ts(62,9): error TS2783: 'editor' is specified more than once, so this usage will be overwritten.
thislessFunctionsNotContextSensitive3.ts(81,9): error TS2783: 'editor' is specified more than once, so this usage will be overwritten.
thislessFunctionsNotContextSensitive3.ts(96,3): error TS2353: Object literal may only specify known properties, and 'child' does not exist in type 'Partial<{ parent: string; overwrite: string; }>'.
thislessFunctionsNotContextSensitive3.ts(108,3): error TS2353: Object literal may only specify known properties, and 'child' does not exist in type 'Partial<{ parent: string; overwrite: string; }>'.


==== thislessFunctionsNotContextSensitive3.ts (4 errors) ====
    declare class Editor {
      private _editor;
    }
    
    declare class Plugin {
      private _plugin;
    }
    
    type ParentConfig<T> = Partial<{
      [P in keyof T]: Required<T>[P] extends (...args: any) => any
        ? (...args: Parameters<Required<T>[P]>) => ReturnType<Required<T>[P]>
        : T[P];
    }>;
    
    interface ExtendableConfig<
      Options = any,
      Config extends
        | ExtensionConfig<Options>
        | ExtendableConfig<Options> = ExtendableConfig<Options, any>,
    > {
      name: string;
      addOptions?: (this: {
        name: string;
        parent: ParentConfig<Config>["addOptions"];
      }) => Options;
      addProseMirrorPlugins?: (this: {
        options: Options;
        editor: Editor;
      }) => Plugin[];
    }
    
    interface ExtensionConfig<Options = any>
      extends ExtendableConfig<Options, ExtensionConfig<Options>> {}
    
    declare class Extension<Options = any> {
      _options: Options;
    
      static create<O = any>(config: Partial<ExtensionConfig<O>>): Extension<O>;
    
      configure(options?: Partial<Options>): Extension<Options>;
    }
    
    interface SuggestionOptions {
      editor: Editor;
      char?: string;
    }
    
    declare function Suggestion(options: SuggestionOptions): Plugin;
    
    Extension.create({
      name: "slash-command",
      addOptions() {
        return {
          suggestion: {
            char: "/",
          } as SuggestionOptions,
        };
      },
      addProseMirrorPlugins() {
        return [
          Suggestion({
            editor: this.editor, // error
            ~~~~~~~~~~~~~~~~~~~
!!! error TS2783: 'editor' is specified more than once, so this usage will be overwritten.
!!! related TS2785 thislessFunctionsNotContextSensitive3.ts:63:9: This spread always overwrites this property.
            ...this.options.suggestion,
          }),
        ];
      },
    });
    
    Extension.create({
      name: "slash-command",
      addOptions: () => {
        return {
          suggestion: {
            char: "/",
          } as SuggestionOptions,
        };
      },
      addProseMirrorPlugins() {
        return [
          Suggestion({
            editor: this.editor, // error
            ~~~~~~~~~~~~~~~~~~~
!!! error TS2783: 'editor' is specified more than once, so this usage will be overwritten.
!!! related TS2785 thislessFunctionsNotContextSensitive3.ts:82:9: This spread always overwrites this property.
            ...this.options.suggestion,
          }),
        ];
      },
    });
    
    const parentExtension = Extension.create({
      name: "parentExtension",
      addOptions() {
        return { parent: "exists", overwrite: "parent" };
      },
    });
    
    const childExtension = parentExtension.configure({
      child: "exists-too", // error
      ~~~~~
!!! error TS2353: Object literal may only specify known properties, and 'child' does not exist in type 'Partial<{ parent: string; overwrite: string; }>'.
      overwrite: "child",
    });
    
    const parentExtension2 = Extension.create({
      name: "parentExtension2",
      addOptions: () => {
        return { parent: "exists", overwrite: "parent" };
      },
    });
    
    const childExtension2 = parentExtension2.configure({
      child: "exists-too", // error
      ~~~~~
!!! error TS2353: Object literal may only specify known properties, and 'child' does not exist in type 'Partial<{ parent: string; overwrite: string; }>'.
      overwrite: "child",
    });
    
    export {};
    