TyrealHu / acorn-typescript

Alternative, TypeScript parser
https://www.npmjs.com/package/acorn-typescript?activeTab=readme
MIT License
145 stars 18 forks source link

SyntaxError: override modifier refused despite containing class extending another #56

Open bpstrngr opened 5 months ago

bpstrngr commented 5 months ago

Shouldn't this condition be a negation? https://github.com/TyrealHu/acorn-typescript/blob/8956dc50370c7ee2ea97a3c903611079192b28d5/src/index.ts#L3938

detected in parsing file: https://github.com/socketio/socket.io-adapter/blob/28f60b880ad04ff4b48ade0cd529f1970643604f/lib/index.ts#L438

error:

Failed to patriate typescript "file:///mnt/chromeos/GoogleDrive/MyDrive/blik/rauch_2014_socketio_adapter/0/lib/index.ts" due to SyntaxError: This member cannot have an 'override' modifier because its containing class does not extend another class. (438:2)
    at pp$4.raise (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/haverbeke_2012_acorn.js:2473:13)
    at TypeScriptParser.raiseCommonCheck (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:5207:44)
    at TypeScriptParser.raise (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:5213:29)
    at callParseClassMemberWithIsStatic (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:4067:38)
    at TypeScriptParser.parseClassElement (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:4132:21)