Skip to content

duplicate emit /// <reference types="node" /> #48143

Closed
@bluelovers

Description

@bluelovers

Bug Report

🔎 Search Terms

🕗 Version & Regression Information

Version 4.7.0-dev.20220305

  • This is a crash
  • This changed between versions ______ and _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

Playground link with relevant code

💻 Code

// We can quickly address your report if:
//  - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
//  - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
//  - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
//  - We have to pare too much extraneous code.
//  - We have to clone a large repo and validate that the problem isn't elsewhere.
//  - The sample is confusing or doesn't clearly demonstrate what's wrong.

🙁 Actual behavior

bluelovers/ws-iconv@c039e94

https://github.com/bluelovers/ws-iconv/blob/c039e942f8562c9fdbba4e8d50c19afc20cc687f/packages/%40lazy-node/readlines/lib/types.d.ts

/// <reference types="node" />
/// <reference types="node" />
/**
 * Created by user on 2020/5/29.
 */
import { PathLike } from 'fs';
export interface IOptions {
    readChunk?: number;
    newLineCharacter?: INewLineCharacter;
}
export declare const enum EnumNewLineCharacter {
    LF = 10,
    CR = 13
}
export declare type IPathLike = PathLike | number;
export declare type INewLineCharacter = string | number | EnumNewLineCharacter | (string | number | EnumNewLineCharacter)[] | Buffer;

🙂 Expected behavior

/// <reference types="node" />
/**
 * Created by user on 2020/5/29.
 */
import { PathLike } from 'fs';
export interface IOptions {
    readChunk?: number;
    newLineCharacter?: INewLineCharacter;
}
export declare const enum EnumNewLineCharacter {
    LF = 10,
    CR = 13
}
export declare type IPathLike = PathLike | number;
export declare type INewLineCharacter = string | number | EnumNewLineCharacter | (string | number | EnumNewLineCharacter)[] | Buffer;

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesFix AvailableA PR has been opened for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions