Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🏷️ Fix addModule() types #3814

Merged
merged 1 commit into from
Jun 29, 2023
Merged

Commits on Jun 28, 2023

  1. 🏷️ Fix addModule() types

    At the moment, since `@ts-expect-error` [doesn't apply][1] to type
    definitions, we get a downstream compilation error:
    
    ```
    TS2416: Property 'addModule' in type 'BaseTheme' is not assignable to the same property in base type 'Theme'.
      Type '(name: string) => unknown' is not assignable to type '{ (name: "clipboard"): Clipboard; (name: "keyboard"): Keyboard; (name: "uploader"): Uploader; (name: "history"): History; (name: "selection"): Selection; (name: string): unknown; }'.
        Type '{}' is missing the following properties from type 'Clipboard': matchers, addMatcher, convert, convertHTML, and 8 more.
    
    10     addModule(name: string): unknown;
    ```
    
    This change updates the `Base` class to have the same signature as
    for `addModule()` as its parent class.
    
    [1]: microsoft/TypeScript#38628
    alecgibson committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    33224ec View commit details
    Browse the repository at this point in the history