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

Use declare let in globals.ts #4940

Conversation

KamilaBorowska
Copy link
Collaborator

Should fix LGTM warnings.

@Zarel
Copy link
Member

Zarel commented Oct 30, 2018

This pull request fixes 7 alerts when merging 6d3e724 into 5d7d317 - view on LGTM.com

fixed alerts:

  • 7 for Unused variable, import, function or class

Comment posted by LGTM.com

@Zarel
Copy link
Member

Zarel commented Oct 30, 2018

Neat! Unfortunately, we seem to have a whole new world of TypeScript errors due to the change.

@Zarel
Copy link
Member

Zarel commented Oct 30, 2018

Apparently globals.ts previously just wasn't doing anything?

@sirDonovan
Copy link
Collaborator

Now import() is getting the types of the files while before require() just resolved to any.

@Zarel Zarel force-pushed the master branch 3 times, most recently from c8b321b to d90ac63 Compare December 2, 2018 01:30
@DubbleClick
Copy link
Contributor

Implemented in #5139.
Can't use declare because the variable will not be assigned anywhere else, can't use import because it returns an asnyc Promise. Would have to do a whole bunch of changes to the code and wrap usages in asnyc/await blocks, so I refrained from that and just took type hints from the import while using standard require.

@Zarel
Copy link
Member

Zarel commented Feb 5, 2019

Implemented in ffdcff3

@Zarel Zarel closed this Feb 5, 2019
@Zarel
Copy link
Member

Zarel commented Feb 5, 2019

(Thanks, @DubbleClick for reminding me to do this, and also for the approach I ended up using.)

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.

4 participants