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

[core] fix(useHotkeys): remove synthetic default import of React #4591

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

styu
Copy link
Contributor

@styu styu commented Mar 17, 2021

Fixes #0000

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Revert to using import * as React syntax for useHotkeys, else you get these errors when allowSyntheticDefaultImports is not enabled:

[error] TypeScript error node_modules/.pnpm/@blueprintjs/core@3.41.0_react-dom@16.14.0+react@16.14.0/node_modules/@blueprintjs/core/lib/esm/hooks/hotkeys/useHotkeys.d.ts:1:8 - error TS1259: Module '"/home/git/project/node_modules/.pnpm/@types/react@16.9.55/node_modules/@types/react/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
1 import React from "react";
         ~~~~~
  node_modules/.pnpm/@types/react@16.9.55/node_modules/@types/react/index.d.ts:65:1
    65 export = React;
       ~~~~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

Reviewers should focus on:

Screenshot

@styu styu requested a review from adidahiya March 17, 2021 23:51
@blueprint-bot
Copy link

Revert es module style import for React in useHotkeys

Previews: documentation | landing | table

@adidahiya adidahiya changed the title Revert es module style import for React in useHotkeys [core] fix(useHotkeys): remove synthetic default import of React Mar 18, 2021
@adidahiya adidahiya merged commit 750cc49 into develop Mar 18, 2021
@adidahiya adidahiya deleted the styu-patch-1 branch March 18, 2021 13:54
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.

3 participants