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

'default' is not defined in typeof import #3006

Closed
bezenson opened this issue Feb 6, 2021 · 0 comments · Fixed by #3008
Closed

'default' is not defined in typeof import #3006

bezenson opened this issue Feb 6, 2021 · 0 comments · Fixed by #3008
Assignees
Labels
bug Something isn't working package: scope-manager Issues related to @typescript-eslint/scope-manager

Comments

@bezenson
Copy link

bezenson commented Feb 6, 2021

Repro

module.exports = {
  root: true,
  extends: '@react-native-community',
  parser: '@typescript-eslint/parser',
  plugins: ['@typescript-eslint'],
};
export type RootAction = ActionType<typeof import('./src/store/actions').default>;
export type AppState = ReturnType<typeof import('./src/store/reducers').default>;

Expected Result

No errors here like it was before

Actual Result

/.../types.d.ts
  4:74  error  'default' is not defined  no-undef
  5:73  error  'default' is not defined  no-undef

Additional Info

In this files (actions and reducers) I have default export

const appReducer = combineReducers({
// ...
});

export default appReducer;

Versions

package version
@typescript-eslint/parser 4.14.2
TypeScript 4.1.3
ESLint 7.19.0
node 12.18.4
@bezenson bezenson added package: parser Issues related to @typescript-eslint/parser triage Waiting for maintainers to take a look labels Feb 6, 2021
@bradzacher bradzacher added bug Something isn't working package: scope-manager Issues related to @typescript-eslint/scope-manager and removed package: parser Issues related to @typescript-eslint/parser triage Waiting for maintainers to take a look labels Feb 6, 2021
@bradzacher bradzacher self-assigned this Feb 6, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: scope-manager Issues related to @typescript-eslint/scope-manager
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants