tsc compilation error. #11915
TheFlyingHawk
started this conversation in
General
Replies: 1 comment
-
I got same error and lots of others when tried to compile project with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
document.addEventListener('DOMContentLoaded', (event: Event) => {
const myDiv = document.getElementById('myDiv');
});
PS D:\Works\TS\BackEnd> tsc --outDir ./public/src/js ./public/ts/editor.ts
C:/Users/win11/.bun/install/global/node_modules/typescript/lib/lib.dom.d.ts:8183:11 - error TS2430: Interface 'EventSource' incorrectly extends interface 'Bun.EventSource'.
Types of property 'onerror' are incompatible.
Type '(this: EventSource, ev: Event) => any' is not assignable to type '(this: Bun.EventSource, ev: Event) => any'.
The 'this' types of each signature are incompatible.
Type 'Bun.EventSource' is not assignable to type 'EventSource'.
Types of property 'onmessage' are incompatible.
Type '(this: Bun.EventSource, ev: Bun.MessageEvent) => any' is not assignable to type '(this: EventSource, ev: MessageEvent) => any'.
Types of parameters 'ev' and 'ev' are incompatible.
Type 'MessageEvent' is not assignable to type 'Bun.MessageEvent'.
Types of property 'ports' are incompatible.
Type 'readonly MessagePort[]' is not assignable to type 'readonly import("worker_threads").MessagePort[]'.
Type 'MessagePort' is missing the following properties from type 'MessagePort': ref, unref, addListener, emit, and 13 more.
8183 interface EventSource extends EventTarget {
~~~~~~~~~~~
C:/Users/win11/.bun/install/global/node_modules/typescript/lib/lib.dom.d.ts:15520:11 - error TS2430: Interface 'MessageEvent' incorrectly extends interface 'Bun.MessageEvent'.
Types of property 'ports' are incompatible.
Type 'readonly MessagePort[]' is not assignable to type 'readonly import("worker_threads").MessagePort[]'.
15520 interface MessageEvent<T = any> extends Event {
~~~~~~~~~~~~
C:/Users/win11/.bun/install/global/node_modules/typescript/lib/lib.dom.d.ts:25534:11 - error TS2430: Interface 'WebSocket' incorrectly extends interface 'import("D:/Works/TS/BackEnd/node_modules/@types/ws/index").WebSocket'.
Types of property 'binaryType' are incompatible.
Type 'BinaryType' is not assignable to type '"arraybuffer" | "nodebuffer" | "fragments"'.
Type '"blob"' is not assignable to type '"arraybuffer" | "nodebuffer" | "fragments"'.
25534 interface WebSocket extends EventTarget {
~~~~~~~~~
node_modules/@types/node/module.d.ts:283:13 - error TS2687: All declarations of 'dirname' must have identical modifiers.
283 dirname: string;
~~~~~~~
node_modules/@types/node/module.d.ts:289:13 - error TS2687: All declarations of 'filename' must have identical modifiers.
289 filename: string;
~~~~~~~~
node_modules/bun-types/bun.d.ts:117:8 - error TS2420: Class 'ShellError' incorrectly implements interface 'ShellOutput'.
Property 'bytes' is missing in type 'ShellError' but required in type 'ShellOutput'.
117 class ShellError extends Error implements ShellOutput {
~~~~~~~~~~
node_modules/bun-types/bun.d.ts:434:3
434 bytes(): Uint8Array;
~~~~~~~~~~~~~~~~~~~~
'bytes' is declared here.
node_modules/bun-types/globals.d.ts:1893:12 - error TS2687: All declarations of 'dirname' must have identical modifiers.
1893 readonly dirname: string;
~~~~~~~
node_modules/bun-types/globals.d.ts:1896:12 - error TS2687: All declarations of 'filename' must have identical modifiers.
1896 readonly filename: string;
~~~~~~~~
node_modules/bun-types/overrides.d.ts:3:20 - error TS2305: Module '"bun"' has no exported member 'PathLike'.
3 import type { Env, PathLike, BunFile } from "bun";
~~~~~~~~
Found 9 errors in 5 files.
Errors Files
3 C:/Users/win11/.bun/install/global/node_modules/typescript/lib/lib.dom.d.ts:8183
2 node_modules/@types/node/module.d.ts:283
1 node_modules/bun-types/bun.d.ts:117
2 node_modules/bun-types/globals.d.ts:1893
1 node_modules/bun-types/overrides.d.ts:3
PS D:\Works\TS\BackEnd> bun --version
1.1.8
Beta Was this translation helpful? Give feedback.
All reactions