···
On Wed, Dec 7, 2016 at 6:34 PM, Alex Rice rice.guido@gmail.com wrote:
Thanks for the suggestion, Mateusz, but so far I have been unable to
get the bokeh typings to work with the Atom editor (https://atom.io/).
Can anyone else confirm works and if so can you share the steps you
took?
you may be the only person using TypeScript and bokeh (besides me), but let the community prove me wrong.
I have tried both via github rep and via the npm installed
bokehjs. In either scenario, the tool always lists lots of errors
starting with
cannot find module ‘core/properties’
cannot find module ‘models/layouts/layout_dom’
etc.
This is actually not related to typings, but to module resolution. Either base path or module resolution method (or both) are misconfigured. How exactly this is configured in Atom is outside of the scope of my knowledge. However, vscode works (at least for me) without further configuration (assuming bokeh from master).
The manner in which I added the typings is this, in my tsconfig.json:
“atom”: {
"rewriteTsconfig": true
},
"filesGlob": [
"./*.ts",
"../bokeh/bokehjs/src/coffee/api/*.d.ts",
"../bokeh/bokehjs/src/coffee/api/typings/*.d.ts",
"../bokeh/bokehjs/src/coffee/api/typings/models/*.d.ts"
],
"files": [
"./custom.ts",
"../bokeh/bokehjs/src/coffee/api/typings.d.ts",
"../bokeh/bokehjs/src/coffee/api/typings/bokeh.d.ts",
"../bokeh/bokehjs/src/coffee/api/typings/charts.d.ts",
"../bokeh/bokehjs/src/coffee/api/typings/colors.d.ts",
# etc... here atom has automatically filled in about ~35
files from expanding the filesGlob pattern
]
You should follow exactly how tsconfigs are done in examples. Module resolution configuration must be set appropriately (this should solve “cannot find module” errors). Including only typings.d.ts should be sufficient (assuming all dependencies are in-place after npm install). If you proceed like this, then you will have to update that tsconfig quite often.
Mateusz
On Wed, Dec 7, 2016 at 2:26 AM, Mateusz Paprocki
mateusz.paprocki@continuum.io wrote:
Hi,
On Wed, Dec 7, 2016 at 1:50 AM, Alex Rice rice.guido@gmail.com wrote:
Hi all, I see there are typescript definitions in
bokehjs/src/coffee/api/typings
What is the best way to install those using the tsd command? I have
tried various incarnations of the tsd install command but no luck so
far. I also tried adding this to my .ts file, but it does not seem to
effect the tooling (Atom editor)
///
I suggest starting with our TypeScript examples in
https://github.com/bokeh/bokeh/tree/master/bokehjs/examples. We use
tsconfig.json to set everything up. Just note that those examples assume
that everything happens inside bokehjs’ development environment. We yet need
to verify this works when using an npm installed bokehjs.
Mateusz
Thanks,
Alex
–
You received this message because you are subscribed to the Google Groups
“Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/CACmK6Bthv3bbFH5pXisu56bwnE2AxcZ7rUw%2BFm83Xhq160xqTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups
“Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/CANFzp8iaqj8%2BxmOwx6ua-x0gQ-mMFVjdOkQNnjUaCH2FnzfyHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CACmK6BtXj8yqYuLYE3%2BAjM7YjKi1Kpb4S3H_9My%3D6%2BTxxdwCgw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.