fumiX / fuBlog

Blog Software
https://blog.fumix.de
Apache License 2.0
2 stars 1 forks source link

Upgrade to Typescript 5.0 #29

Closed floscher closed 1 year ago

floscher commented 1 year ago

https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/

https://github.com/fumiX/fuBlog/commit/56047e00ca4668918eac2cb2257a604ed3007b56

floscher commented 1 year ago

@thooyork This leads to an error in the client when npm install is being run and it is updated from 1.3.8 to 1.3.11: https://github.com/fumiX/fuBlog/blob/a29bce440f7b860a8161db2b6a7de00b91be3aa0/client/package.json#L46

https://github.com/fumiX/fuBlog/blob/2cde5d62115453d2534688377c7d8b9258992d20/package-lock.json#L14265-L14280

The error message was something similar to https://github.com/vuejs/language-tools/issues/2570 . It complained about this line, that the value had a type that is not allowed: https://github.com/fumiX/fuBlog/blob/2cde5d62115453d2534688377c7d8b9258992d20/client/src/App.vue#L46

To reproduce do this to v0.1.0:

rm -r node_modules/ */node_modules/ package-lock.json && npm install && npm run build

Results in this error:

src/App.vue(46,19): error TS2345: Argument of type '{ [x: string]: any; userPermissions: { canEditUserRoles: boolean; canCreatePost: boolean; canEditPost: boolean; canDeletePost: boolean; } | null; }' is not assignable to parameter of type 'AllowedComponentProps & ComponentCustomProps & VNodeProps & RouterViewProps'.
         Object literal may only specify known properties, and 'userPermissions' does not exist in type 'AllowedComponentProps & ComponentCustomProps & VNodeProps & RouterViewProps'.
       src/views/PostFormView.vue(85,34): error TS2339: Property 'dropzoneHighlight' does not exist on type '{ default(): any; }'.
       src/views/PostFormView.vue(88,42): error TS2339: Property 'dropzoneHighlight' does not exist on type '{ default(): any; }'.
thooyork commented 1 year ago

implemented.