microsoft / microsoft/TypeScript
Declaration emit differs for negative numeric const literals
未关闭
Possible Improvement
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
## Steps to reproduce
`main.ts`:
```ts
export const a = -1e500 as const;
export const b = -123456789012345678901234567890 as const;
```
```sh
tsgo --declaration main.ts
```
## Behavior with `typescript@6.0`
```ts
export declare const a: -1e500;
export declare const b: -123456789012345678901234567890;
```
## Behavior with `tsgo`
```ts
export declare const a: -Infinity;
export declare const b: -1.2345678901234568e+29;
```
贡献指南
评估
这个 Issue 还没有评估数据。