prismatic-io / embedded

Prismatic's library for embedding Prismatic.io into your application.
MIT License
24 stars 2 forks source link

Cannot find name 'Awaited'. #45

Closed TejasChaudhariNdb closed 1 year ago

TejasChaudhariNdb commented 1 year ago

When i try to import package to Angular app then this error occurs

Error: node_modules/@prismatic-io/embedded/node_modules/@prismatic-io/spectral/dist/types/ActionDefinition.d.ts:24:22 - error TS2304: Cannot find name 'Awaited'. examplePayload?: Awaited<ReturnType<this["perform"]>>;


Error: node_modules/@prismatic-io/embedded/node_modules/@prismatic-io/spectral/dist/types/DataSourceDefinition.d.ts:16:22 - error TS2304:
 Cannot find name 'Awaited'.
examplePayload?: Awaited<ReturnType<this["perform"]>>;

Error: node_modules/@prismatic-io/embedded/node_modules/@prismatic-io/spectral/dist/types/TriggerDefinition.d.ts:31:22 - error TS2304: Cannot find name 'Awaited'. examplePayload?: Awaited<ReturnType<this["perform"]>>;

image

TejasChaudhariNdb commented 1 year ago

"typescript": "^4.3.5" "@agm/core": "^1.1.0", "@angular/animations": "~12.2.7", "@angular/cdk": "^12.2.8", "@angular/common": "~12.2.7", "@angular/compiler": "~12.2.7",

taylorreece commented 1 year ago

Hi @TejasChaudhariNdb ,

It looks like the Awaited keyword was introduced in Typescript 4.5 https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html. Are you able to bump your typescript dependency to a more recent version?

taylorreece commented 1 year ago

Closing this issue. Typescript 4.5 should resolve the error you noted 👍