This repository has been archived by the owner on Oct 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
bugfix: Including default "finally" hook. The fixe includes the property required by type HooksObject. #271
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…erty in type HooksObject. * Tested on CLI Plus Version: 0.8.10 * See my feathers-gen-specs.json below if needed. * The error occurs when running `yarn start` immediately after `feathers-plus generate app`. **Excerpt of error message:** ``` yarn run v1.13.0 $ ts-node --files src/ /Volumes/dev/camera-challenge-fjs/node_modules/ts-node/src/index.ts:261 return new TSError(diagnosticText, diagnosticCodes) ^ TSError: ⨯ Unable to compile TypeScript: src/app.hooks.ts(15,5): error TS2741: Property 'finally' is missing in type '{ before: { all: Hook[]; find: never[]; get: never[]; create: never[]; update: never[]; patch: never[]; remove: never[]; }; after: { all: Hook[]; find: never[]; get: never[]; create: never[]; update: never[]; patch: never[]; remove: never[]; }; error: { ...; }; }' but required in type 'HooksObject'. ``` **My feathers-gen-specs.json** ``` { "options": { "ver": "1.0.0", "inspectConflicts": false, "semicolons": true, "freeze": [], "ts": true }, "app": { "environmentsAllowingSeedData": "", "seedData": false, "name": "camera-challenge-fjs", "description": "Project camera-challenge-fjs", "src": "src", "packager": "yarn@>= 0.18.0", "providers": [ "rest", "socketio" ] }, "services": {}, "hooks": {} } ```
Actually, this PR only patches just one of many files which may need changes. Grep tells me the following 153 files look similarly ... Do they all need a "finally" property added?
|
This was fixed in the typings here: and here: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
yarn start
for the first time afterfeathers-plus generate app
. (See my feathers-gen-specs.json below if needed.)Details of Error Message
The feathers-gen-specs.json if needed to reproduce error