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

import, require, types and module conditions #10

Closed
dominikg opened this issue Dec 12, 2022 · 1 comment · Fixed by #11
Closed

import, require, types and module conditions #10

dominikg opened this issue Dec 12, 2022 · 1 comment · Fixed by #11
Labels
enhancement New feature or request

Comments

@dominikg
Copy link
Contributor

Describe the problem

Currently some conditions are not available due to their special nature.

import,require

import {IMPORT,REQUIRE} from 'node-condtions' doesn't make much sense, or does it?

types

Used by typescript, is that useful at all for applications importing flags or could it be useful in tooling?
Either way, the way tests are currently run it would load our own index.d.ts instead of the conditions so extra care when adding.

module

this is a special condition appearantly used by typescript and esbuild (wtf) see evanw/esbuild#2417

figure out why this exists over import and only support if it makes sense to have it queried

Describe the proposed solution

investigate and add what's sensible

Alternatives considered

leave them out

Importance

nice to have

@dominikg dominikg added the enhancement New feature or request label Dec 12, 2022
@benmccann
Copy link
Collaborator

figure out why this exists over import and only support if it makes sense to have it queried

I went down the rabbit hole on this one not too long ago. There's an explanation of why it exists here: microsoft/tslib#183 (comment)

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

Successfully merging a pull request may close this issue.

2 participants