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 in typescript file #148
Comments
I'm having the same issue. Ever find a fix? |
See this example: http://jqfaq.com/how-to-use-external-js-in-typescript/ I was able to use RRule in my ts file like so (after including rrule.js in my index.html page): // File form.ts module myapp.controllers {
} Hope this helps someone. |
What I do in this cases is to define a Typing. content of the rrule.d.ts file:
you can extend their properties there if you want. then link the rrule.d.ts to index.d.ts per example (i normally group all my d.ts in 1 file referencing them there) index.d.ts: after that you can use
without defining the Best regards! |
Running |
@dennis2k and how have you solved it with rrulestr? |
@uncledent I was only able to this using require
|
@dennis2k Thank you for your answer, but this can't be used in Angular4 :( |
I could do this this way in Angular2/4, not pretty, but works: |
I think this issue is dead. Please update if more support is needed! |
Hey guys,
I was wondering how can I import rrule.js file from typescript:
import 'rrule';
Doesn't seem to work because
module.exports
is evaluated true, so even the global scope is not populated.When I try any other kind of import like:
import * as rrule from 'rrule';
I get this when compiling:
Error TS2307: Cannot find module 'rrule'.
The text was updated successfully, but these errors were encountered: