Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definitions output directory #1

Open
artyomsv opened this issue Sep 5, 2018 · 1 comment
Open

Definitions output directory #1

artyomsv opened this issue Sep 5, 2018 · 1 comment

Comments

@artyomsv
Copy link

artyomsv commented Sep 5, 2018

Hi,

Is it possible to define the output directory for generated definitions?

Thanks in advance!

Artyom

@TasukuUno
Copy link
Owner

Hi @artyomsv, thank you for your issue!

Unfortunately, I think we can not do it now because of spec of type definitions...
for example, we have a file tree like this:

src
├── components
│   ├── Button
│   │   ├── index.ts
│   │   └── style.css
│   └── Page
│       ├── index.ts
│       └── style.css
├── tsconfig.json
└── types
    └── styles
        └── index.d.ts

and, when we want to put definitions of css for Button and one for Page into ./types/style/index.d.ts, we will plan to output a file like this.

declare module "../../components/Button/style.css" {
  // style definitions
}

declare module "../../components/Page/style.css" {
  // style definitions
}

However, TypeScript does not allow it.
We will got an error like this:

Ambient module declaration cannot specify relative module name.

So, at the moment, I think that it is not worth making such a function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants