-
Notifications
You must be signed in to change notification settings - Fork 5
Supply TypeScript typings #1
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
Comments
Yes, I tried to add the typings but it fails because some files, like this import types from external dependencies. I'm getting this error:
I've tried to include these module members in the deps file (https://github.com/postcss/postcss-deno/blob/master/deps.js) (the file to manage all external dependencies), but this does not work: export { default as mozilla, RawSourceMap, SourceMapGenerator } from "https://dev.jspm.io/[email protected]/source-map.js"; This may be cause some dependencies (like source-map) need to be loaded from jspm as long as there's no Deno version yet. If you want to try, just need to set |
@oscarotero You could try using Skypack with |
@shadowtime2000 It looks like node modules are not replaced by deno alternatives:
I've found this port https://github.com/denolib/deno-source-map but it gives some errors in the tests:
|
@oscarotero You could try using the |
@shadowtime2000 I finally managed to maintain the types without errors and created a new branch typescript that you can use to test. I have forked the deno-source-map repository and fixed the error. I've also created a pull request (denolib/deno-source-map#1) but using my own fork meanwhile. |
Well, I think this issue is fixed. I added the TypeScript typings and everything works fine, so the next tagged version will supply the types. |
Deno will not automatically pick up on these, so the js files will need to include a type reference explicitly: https://deno.land/manual/getting_started/typescript#triple-slash-reference-directive-in-javascript-files
The text was updated successfully, but these errors were encountered: