Skip to content

[Question] Can't have a "pure" typescript library. #5225

@s-panferov

Description

@s-panferov

Hello. Sorry if this issue is a double (I can't find anything relevant). Out team uses TypeScript for frontend development and we are trying to use TypeScript everywhere. So we have several libraries written fully in TypeScript.

If I understand correctly, we can't make simple import { smth } from 'pure-ts-lib/some-module'; work without having a generated some-module.d.ts file near some-module.ts. It's very inconvenient to us, because it adds an extra compilation step and more files we need to track. Is there a chance to change this behaviour to simply resolve a .ts module if any? Maybe we can control it by a compiler flag?

References:

TypeStrong/atom-typescript#560 (comment)
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/program.ts#L130

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