Skip to content
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

Add missing efm for TypeScript compiler #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrousavy
Copy link

@mrousavy mrousavy commented Mar 12, 2021

I got this output when running on my local machine:

yarn run v1.22.10
$ tsc --noEmit
example/src/state/selectors.ts:5:3 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Type '({ get }: SelectorGetAtomCommands) => unknown' is not assignable to type '(commands: SelectorGetAtomCommands) => number'.
      Type 'unknown' is not assignable to type 'number'.

5   get: ({ get }) => {
    ~~~

  example/node_modules/pipestate/dist/selector.d.ts:10:5
    10     get: (commands: SelectorGetAtomCommands, ...request: P) => T;
           ~~~
    The expected type comes from property 'get' which is declared here on type 'SelectorProps<number, []>'
  example/node_modules/pipestate/dist/selector.d.ts:36:25
    36 export declare function selector<T, P extends any[]>(props: SelectorProps<T, P>): Selector<T, P>;
                               ~~~~~~~~
    The last overload is declared here.


Found 1 error.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

and on my CI it looked like this:

$ tsc --noEmit
example/src/state/selectors.ts(5,3): error TS2769: No overload matches this call.
  The last overload gave the following error.
    Type '({ get }: SelectorGetAtomCommands) => unknown' is not assignable to type '(commands: SelectorGetAtomCommands) => number'.
      Type 'unknown' is not assignable to type 'number'.
error Command failed with exit code 2.

both of those didn't work with the current tsc, so this PR adds those.

Copy link
Member

@haya14busa haya14busa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test data?

Comment on lines +10 to +11
`%f(%l,%c): error TS%n: %m`,
`%f:%l:%c - error TS%n: %m`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add %E ?

@jihoon416
Copy link

@mrousavy Hi, is this PR still in progress? I would like to use this updated efm so that I can use it with reviewdog-actions-tsc GitHub Action in my repo, but it seems to be on hold for the moment. If you are currently busy I would like to ask permission to fork your branch and create a PR again.

@mrousavy
Copy link
Author

mrousavy commented Feb 4, 2022

Hey, I haven't finished the work here, I think I'm using a different solution now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants