You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.
The implicit type of const variables yields the initialization value of the variable:
main.ts
import{getInfoFromString}from"ts-type-info";constcode=`var a = 10;let b = 10;const c = 10;`;constinfo=getInfoFromString(code);for(constvariableofinfo.variables){console.log(`${variable.declarationType}${variable.name}: ${variable.type.text};`);}
Output with typescript@2.1.4 and ts-type-info@6.2.1
var a: number;
let b: number;
const c: 10;
This might be due to changes in the compiler API from TypeScript 2.0.10 to 2.1.1. npm install ts-type-info installed the latest version (2.1.4), which led to the output above. When uninstalling typescript, and manually installing 2.0.10, the output will look as follows:
Output with typescript@2.0.10 and ts-type-info@6.2.1
var a: number;
let b: number;
const c: number;
I don't know what this change might be yet, but if you want, I can take a look into it by the end of next week.
The text was updated successfully, but these errors were encountered:
michaelneu
pushed a commit
to michaelneu/ts-type-info
that referenced
this issue
Jan 6, 2017
The implicit type of
const
variables yields the initialization value of the variable:main.ts
Output with
typescript@2.1.4
andts-type-info@6.2.1
This might be due to changes in the compiler API from TypeScript 2.0.10 to 2.1.1.
npm install ts-type-info
installed the latest version (2.1.4), which led to the output above. When uninstalling typescript, and manually installing 2.0.10, the output will look as follows:Output with
typescript@2.0.10
andts-type-info@6.2.1
I don't know what this change might be yet, but if you want, I can take a look into it by the end of next week.
The text was updated successfully, but these errors were encountered: