jriecken / dependency-graph

A simple dependency graph for Node.js
http://jriecken.github.io/dependency-graph/
MIT License
333 stars 49 forks source link

error TS7006: Parameter 'T' implicitly has an 'any' type. #19

Closed lancon13 closed 7 years ago

lancon13 commented 7 years ago

Hi,

I have the typescript compiler reported /lib/index.d.ts(33,31): error TS7006: Parameter 'T' implicitly has an 'any' type.

Looks like there is typo under the file lib/index.d.ts

/**
     * set the data for an existing node (will throw an Error if the node does not exist)
     * @param {string} name
     * @param data
     */
    setNodeData(name: string, T): void;

Should be like below?

/**
     * set the data for an existing node (will throw an Error if the node does not exist)
     * @param {string} name
     * @param data
     */
    setNodeData(name: string, data?: T): void;

I am new to typescript, maybe I haven't got my tsconfig.json setup properly..

jriecken commented 7 years ago

You are correct! I've just pushed a fix (and released version 0.5.2)

lancon13 commented 7 years ago

It works fine now. Thanks and like your work!