Skip to content

Minor typing issue #374

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

Closed
2 tasks done
maludwig opened this issue Feb 26, 2021 · 1 comment
Closed
2 tasks done

Minor typing issue #374

maludwig opened this issue Feb 26, 2021 · 1 comment

Comments

@maludwig
Copy link
Contributor

maludwig commented Feb 26, 2021

Bug report

Super minor miss on the typescript definitions, PR for the fix is here:
#373

  • Reproduced on:
  • VSCode
  • WebStorm

Description

CONSTANTS isn't in index.d.ts, so your linter underlines it in red if you're using typescript. Unless you're colorblind, in which case, all you know is that it's underlined. Might be green. You don't know. You're colorblind.

Steps to Reproduce

To recreate the issue, in any typescript file:

import {CONSTANTS} from 'react-native-callkeep';
console.log(CONSTANTS);

eslint/tsc/ts-node will complain about the types not being there

$ ts-node
> import {CONSTANTS} from 'react-native-callkeep';
[eval].ts:3:9 - error TS2614: Module '"react-native-callkeep"' has no exported member 'CONSTANTS'. Did you mean to use 'import CONSTANTS from "react-native-callkeep"' instead?

3 import {CONSTANTS} from 'react-native-callkeep';
          ~~~~~~~~~

undefined
> console.log('boo')
boo
undefined
> 

Versions

- Callkeep: 4.0.1
@maludwig
Copy link
Contributor Author

maludwig commented Mar 3, 2021

Merged and fixed

@maludwig maludwig closed this as completed Mar 3, 2021
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

No branches or pull requests

1 participant