chore: fix js imports resolution

This commit is contained in:
Tim 2024-10-06 19:23:04 +02:00
parent 251878bb69
commit 5ca9d3a701
4 changed files with 20 additions and 8 deletions

View file

@ -9,7 +9,7 @@ interface PlatformContext {
openExternal: (url: string) => void;
}
const PlatformContext = createContext<PlatformContext | null>(null);
const PlatformContext = createContext<PlatformContext>({} as PlatformContext);
type Props = {
children: JSX.Element;

8
src/common/useBinaryState.d.ts vendored Normal file
View file

@ -0,0 +1,8 @@
declare const useBinaryState: (initialValue?: boolean) => [
boolean,
() => void,
() => void,
() => void,
];
export = useBinaryState;

9
src/modules.d.ts vendored
View file

@ -1,3 +1,6 @@
declare module '*.less';
declare module 'stremio/common';
declare module 'stremio/common/*';
declare module '*.less' {
const resource: { [key: string]: string };
export = resource;
}
declare module 'stremio/common/Button';

View file

@ -2,10 +2,11 @@
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable"],
"jsx": "react",
"baseUrl": "src",
"baseUrl": "./src",
"outDir": "./dist",
"moduleResolution": "node",
"paths": {
"stremio/*": ["src/*"],
"stremio/*": ["*"],
},
"resolveJsonModule": true,
"esModuleInterop": true,
@ -15,6 +16,6 @@
"strict": true,
},
"include": [
"src",
],
"src/",
]
}