Skip to content

Typescript error TS2304: Cannot find name 'd3'. But App was able to run d3 when execute in browser. #8264

@trainrail

Description

@trainrail

TypeScript Version:

1.8.7

Code

https://gist.github.com/trainrail/fc5871bb6fc1ebb422e4720b3e3e4264

Quick Description:

Here is a working version of typescript with angular2 and d3 in plunker

Here is also a working version of typescript with angular2 and d3 in my local , however even though the code is working, I am running into compiler error

error TS2304: Cannot find name 'd3'.

Expected behavior:

No compiler error

Actual behavior:

Compiler error

    error TS2304: Cannot find name 'd3'.

even though browser could clearly render the d3 code.

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