8000 TypeScript: Ace.require was lost between 1.36.5 and 1.37.5 · Issue #5743 · ajaxorg/ace · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TypeScript: Ace.require was lost between 1.36.5 and 1.37.5 #5743

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

Closed
shepmaster opened this issue Feb 10, 2025 · 1 comment
Closed

TypeScript: Ace.require was lost between 1.36.5 and 1.37.5 #5743

shepmaster opened this issue Feb 10, 2025 · 1 comment

Comments

@shepmaster
Copy link
shepmaster commented Feb 10, 2025

Describe the bug / Current Behavior

Code like ace.require(/* ... */) is no longer accepted by TypeScript.

Expected Behavior

Code like ace.require(/* ... */) is still accepted by TypeScript.

Reproduction Steps

Create a basic TypeScript project

tsconfig.json

{
  "compilerOptions": {
    "target": "es2016",
    "module": "commonjs",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true
  }
}

package.json

{
  "name": "repro",
  "version": "1.0.0",
  "description": "",
  "main": "index.ts",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "ace-builds": "1.36.5",
    "typescript": "^5.7.3"
  }
}

index.ts

import * as ace from 'ace-builds';

ace.require('cow');

Run the project

pnpm tsc index.ts

Upgrade to 1.37.5, run project again

pnpm tsc index.ts
index.ts:3:5 - error TS2339: Property 'require' does not exist on type 'typeof import("ace-builds")'.

3 ace.require('cow');
      ~~~~~~~

Possible Solution

No response

Additional Information/Context

Going only by the changelog entry, the changes from @mkslanc in #5427 seem likely to be relevant.

Ace Version / Browser / OS / Keyboard layout

Ace 1.37.5 / TypeScript 5.7

@InspiredGuy
Copy link
Contributor

Should be fixed by #5744

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0