8000 Cannot find name 'Promise' & Cannot find name 'require' · Issue #7788 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Cannot find name 'Promise' & Cannot find name 'require' #7788
Closed
@MarkPieszak

Description

@MarkPieszak

TypeScript Version: 1.8.9

Expected behavior:
TS should be aware of require & Promise

Actual behavior:
TS errors appear for require & Promise.

var something = require('something'); // <--  Cannot find name 'require'

Promise<any> { // <-- Cannot find name 'Promise'

I'm able to work around the require issue by simply declaring a custom typing for it, but not with Promise. I'm wondering if these should be more of a default part of TypeScript?

declare var require:any;

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0