interact.js
interact.js copied to clipboard
TypeScript compile errors - version 1.10.26
I have a StencilJs project and I use InteractJs 1.10.19. I wanted to upgrade to version 1.10.26. I have TypeScript compile errors.
Expected behavior
The project should compile with version 1.10.26 also.
Actual behavior
I have these TypeScript compile errors:
`[ ERROR ] TypeScript: node_modules/@interactjs/types/index.d.ts:712:94 Type '"stop" | "start" | "end" | "element" | "interactable" | "prepared" | "pointerIsDown" | "pointerWasMoved" | "_proxy" | "move" | "interacting" | "offsetBy"' does not satisfy the constraint 'keyof Interaction<T>'.Type '"_proxy"' is not assignable to type 'keyof Interaction<T>'.
L711: }
L712: type InteractionProxy<T extends ActionName | null = never> = Pick<Interaction<T>, keyof typeof _ProxyValues |
L713: export class Interaction<T extends ActionName | null = ActionName> {
[ ERROR ] TypeScript: node_modules/@interactjs/types/index.d.ts:727:30 Property 'fire' does not exist on type 'Scope'.
L726: pointerType?: string; L727: scopeFire: Scope['fire']; L728: });
[ ERROR ] TypeScript: node_modules/@interactjs/types/index.d.ts:915:19 Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
L914: declare module "@interactjs/core/interactions" { L915: import type { Plugin } from "@interactjs/core/scope"; L916: import type { ActionName, Listener } from "@interactjs/core/types";`
System configuration
interact.js version: 1.10.26 Operating System: Kubuntu 22.04
I'm seeing this too. "typescript": "~5.2.2" Thank you for all your work!
Compiled with problems:
×
ERROR
node_modules/@interactjs/types/index.d.ts:324:18 - error TS2428: All declarations of 'BaseEvent' must have identical type parameters.
324 export class BaseEvent<T extends ActionName | null = never> {
~~~~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:343:22 - error TS2428: All declarations of 'BaseEvent' must have identical type parameters.
343 export interface BaseEvent<T extends ActionName> {
~~~~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:712:94 - error TS2344: Type '"interactable" | "element" | "prepared" | "pointerIsDown" | "pointerWasMoved" | "_proxy" | "start" | "move" | "end" | "stop" | "interacting" | "offsetBy"' does not satisfy the constraint 'keyof Interaction<T>'.
Type '"_proxy"' is not assignable to type 'keyof Interaction<T>'.
712 export type InteractionProxy<T extends ActionName | null = never> = Pick<Interaction<T>, keyof typeof _ProxyValues | keyof typeof _ProxyMethods>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:727:30 - error TS2339: Property 'fire' does not exist on type 'Scope'.
727 scopeFire: Scope['fire'];
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:915:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
915 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:977:26 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
977 import type { Scope, Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1091:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1091 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1193:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1193 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1360:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1360 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1435:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1435 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1562:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1562 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1746:26 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1746 import type { Scope, Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1821:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1821 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1854:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1854 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:1966:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
1966 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:2170:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
2170 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:2212:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
2212 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:2234:31 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
2234 import type { SignalArgs, Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:2435:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
2435 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:2932:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
2932 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:2974:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
2974 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:3045:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
3045 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:3066:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
3066 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:3077:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
3077 import type { Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:3087:26 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
3087 import type { Scope, Plugin } from "@interactjs/core/scope";
~~~~~~
ERROR
node_modules/@interactjs/types/index.d.ts:3200:19 - error TS2305: Module '"@interactjs/core/scope"' has no exported member 'Plugin'.
3200 export type { Plugin } from "@interactjs/core/scope";
~~~~~~
Me too! Same as @ryanrain
Can you share a minimal repo that reproduces this error?
Here is a sample project with Stencil: https://github.com/codluca/stencil-interact-upgrade-test Try: npm install npm run build