-
Notifications
You must be signed in to change notification settings - Fork 148
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
Support multiple TypeScript entry points #219
Comments
Hey @tobalsgithub, I don't know enough about TypeScript typings to say what the best way forward is; from reading the issue you linked, it sounds like |
You may need to add {
"compilerOptions": {
"lib": [
"dom" // ...
]
}
} |
It's been a while. I may have been using Or maybe I wasn't generating/validating the stubs in strict mode and didn't see that warning. |
@andrew8er, adding It feels like the right solution here would be to somehow conditionally include the type definitions for Here's a discussion that looks related. May just be something we have to workaround for the time being. microsoft/TypeScript#449 I appreciate y'all taking a look. |
I am not using this project currently, so I do not really know how |
In my project I am using the blob functionality. I have an API that is used to stream a large set of data points from server to client. To save on bandwidth and serialization effort I use this library to create a condense, compressed format of that data. The blob feature is used on the client side to get access to the underlying data stream. As such I would like to have this functionality in. Would it not be possible as a workaround to use two entry points into the package? One for node, the other for web? |
That sounds like a good idea (we actually already do it for JavaScript), I'd be happy to merge a PR which implements a TypeScript equivalent. |
Ran into an issue compiling the type definitions in typescript in a node environment. I'm using this command
tsc --outDir bld --module commonjs --target ES2016
to compile and I hit this errorTypescript: 2.9.2
Node: 8.11.3
It appears that
Blob
is a global exposed on browsers but not available in a node environment.This issue discusses the same problem for a different library. DefinitelyTyped/DefinitelyTyped#12044
I'd make a PR to fix this, but I don't actually know what the right solution is here. It feels like an anti-pattern to have the type definitions depend on something globally available only in certain environments, but I'm not well versed enough in typescript to know how to handle such a situation.
For now, I've changed my compilation command to
tsc --outDir bld --module commonjs --target ES2016 --skipLibCheck
which gets me around the problem.The text was updated successfully, but these errors were encountered: