TypeScript compile failure after upgrade to 5.0.0-alpha.25

Hello, and I have been getting the following errors using tsc since updating to the latest alpha:

node_modules/@types/webxr/index.d.ts:70:30 - error TS2304: Cannot find name ‘EventHandlerNonNull’.
70 export type XREventHandler = EventHandlerNonNull;
~~~~~~~~~~~~~~~~~~~
node_modules/@types/webxr/index.d.ts:152:24 - error TS2304: Cannot find name ‘Gamepad’.
152 readonly gamepad?: Gamepad;
~~~~~~~
Found 2 errors.

The @types/webxr is being imported implicitly, and does not look like it has updated in a few months.

Any ideas what is causing the issue?
Robert

1 Like

pinging our XR master @RaananW

@RaananW will be back on Monday so bear please bear with us in the mean time.

Seems like an issue with the webxt declaration itself. I’ll need to update the declaration file on the definitely-typed repository.

What version of typescript are you using? It should be defined by typescript itself, but the definitions might have been removed

1 Like

Hey, and I am using:

typescript@4.2.3

Let me know if there is a recommended version which includes the type support you mention, and thanks.

r

How does your tsconfig look like? what libs are you targeting? got “dom” included there?

Hey, and it is happening during the compilation of my sw, which uses webworker and not dom.

tsc --lib “ES6,esnext,webworker” --moduleResolution node --sourceMap true --target ES6 src/service-worker.ts

This command fails after the upgrade.

r

I added --skipLibCheck true to the command line and it compiles.

1 Like