-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: review typescript signature #164
Conversation
@@ -31,13 +31,17 @@ type FastifyOramaPluginOptions = { | |||
|
|||
declare const fastifyOrama: FastifyPluginCallback<FastifyOramaPluginOptions> | |||
|
|||
interface OramaApi<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it
test/types/index.test-d.ts
Outdated
@@ -1,9 +1,9 @@ | |||
import { expectType } from 'tsd' | |||
import {expectType} from 'tsd' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the linting here?
import {expectType} from 'tsd' | |
import { expectType } from 'tsd' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@mateonunez and @Eomm seems the CI is stick! I don't have any permission on it, but can one of you check it or restart the job? |
The action gets stuck with Node v20 here: |
CI passed. |
Okay, I don't know how. I had the same problem locally with node 20. |
Let's see what @Eomm says, then I think we can merge it into the |
* breaking: migrate to cjs * fix: typescript interface * refactor: review typescript signature (#164) --------- Co-authored-by: Luca Del Puppo <Puppo@users.noreply.github.com>
@Eomm and @mateonunez, I reviewed a little the typescript interface and removed the
getOrama
method.In this way, there is only one decorator, and if someone wants to use typescript, using the
withOrama<T>()
get the FastifyInstance with the correct type and with theorama
decorator set up.