src/cloud.ts:15:1 - error TS2322: Type '{ Api: typeof Api; getWorlds: () => Promise<WorldInfo[]>; fetch: any; }' is not assignable to type '{ Api: new (info: WorldInfo) => WorldApi; getWorlds: () => Promise<WorldInfo[]>; fetch: (input?: ...'.
Types of property 'Api' are incompatible.
Type 'typeof Api' is not assignable to type 'new (info: WorldInfo) => WorldApi'.
Type 'Api' is not assignable to type 'WorldApi'.
Property 'name' is missing in type 'Api'.
15 MessageBot.dependencies = { Api, getWorlds, fetch }
~~~~~~~~~~~~~~~~~~~~~~~
src/mac.ts:14:1 - error TS2322: Type '{ Api: typeof Api; getWorlds: () => Promise<WorldInfo[]>; fetch: any; }' is not assignable to type '{ Api: new (info: WorldInfo) => WorldApi; getWorlds: () => Promise<WorldInfo[]>; fetch: (input?: ...'.
Types of property 'Api' are incompatible.
Type 'typeof Api' is not assignable to type 'new (info: WorldInfo) => WorldApi'.
Type 'Api' is not assignable to type 'WorldApi'.
Property 'name' is missing in type 'Api'.
14 MessageBot.dependencies = { Api, getWorlds, fetch }
~~~~~~~~~~~~~~~~~~~~~~~
And voila, typescript hates on your code. 😉
steps to reproduce:
git clone https://github.com/Blockheads-Messagebot/Console-Loader.gitcd Console-Loadernpm installnpm run buildAnd voila, typescript hates on your code. 😉