Skip to content

ace-builds/src-noconflict/ext-themelist: None of the types work anymore after upgrading from 1.36.5 to 1.37.5 #5723

@MartinXPN

Description

@MartinXPN

Describe the bug

I had the following code in my React code:

import {themesByName} from 'ace-builds/src-noconflict/ext-themelist';
type ThemeType = keyof typeof themesByName;         // <- This results in `never` (used to be all the theme keys)


// ....

if (disablePasting) {
    editorInstance.on('paste', e => e.text = '');      // <- This results in an error "TS2339: Property text does not exist on type string"
    document.addEventListener('paste', e => e.preventDefault());
}

Expected Behavior

The types should be recognized properly and Typescript shouldn't result in an error.

Current Behavior

The project fails to run. So, I had to revert back to the 1.36.5 version.

Reproduction Steps

Include the code above in a Reac + Typescript project. Try to access the themesByName object.

Possible Solution

No response

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

ace: 1.37.5, browser: chrome, os: mac

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions