justjake / monorepo

GNU Affero General Public License v3.0
40 stars 2 forks source link

[notion-api] Typescript errors #2

Closed harryzcy closed 1 year ago

harryzcy commented 2 years ago

Compiling using notion-api is giving errors:

node_modules/@jitl/notion-api/src/lib/notion-api.d.ts:178:9 - error TS2536: Type 'K' cannot be used to index type 'BlockTypeMap[K]'.

178     } ? BlockTypeMap[K][K] : never;
            ~~~~~~~~~~~~~~~~~~

node_modules/@jitl/notion-api/src/lib/notion-api.d.ts:335:9 - error TS2590: Expression produces a union type that is too complex to represent.

335     } ? PropertyFilterTypeMap[K][K] : never;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@jitl/notion-api/src/lib/notion-api.d.ts:5885:9 - error TS2536: Type 'K' cannot be used to index type 'PropertyTypeMap[K]'.

5885     } ? PropertyTypeMap[K][K] : never;
             ~~~~~~~~~~~~~~~~~~~~~

node_modules/@jitl/notion-api/src/lib/notion-api.d.ts:6033:9 - error TS2536: Type 'K' cannot be used to index type 'PropertySchemaTypeMap[K]'.

6033     } ? PropertySchemaTypeMap[K][K] : never;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 4 errors in the same file, starting at: node_modules/@jitl/notion-api/src/lib/notion-api.d.ts:178