diff --git a/src/common/Platform/Platform.tsx b/src/common/Platform/Platform.tsx index 69ff3e8c3..057e60703 100644 --- a/src/common/Platform/Platform.tsx +++ b/src/common/Platform/Platform.tsx @@ -9,7 +9,7 @@ interface PlatformContext { openExternal: (url: string) => void; } -const PlatformContext = createContext(null); +const PlatformContext = createContext({} as PlatformContext); type Props = { children: JSX.Element; diff --git a/src/common/useBinaryState.d.ts b/src/common/useBinaryState.d.ts new file mode 100644 index 000000000..c61a28712 --- /dev/null +++ b/src/common/useBinaryState.d.ts @@ -0,0 +1,8 @@ +declare const useBinaryState: (initialValue?: boolean) => [ + boolean, + () => void, + () => void, + () => void, +]; + +export = useBinaryState; \ No newline at end of file diff --git a/src/modules.d.ts b/src/modules.d.ts index 70ebbd3fc..73d4eec32 100644 --- a/src/modules.d.ts +++ b/src/modules.d.ts @@ -1,3 +1,6 @@ -declare module '*.less'; -declare module 'stremio/common'; -declare module 'stremio/common/*'; \ No newline at end of file +declare module '*.less' { + const resource: { [key: string]: string }; + export = resource; +} + +declare module 'stremio/common/Button'; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 896a7d197..fd930dbcf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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/", + ] }