As a novice user of typescript (but an experienced user of Bokeh), I'm trying to take one of the BokehJS examples and run it standalone -- that is outside of the file hierarchy of the Bokeh git repo.
So for example, if I want to run the burtin
example, I copy the .ts
, .html
and tsconfig.json
(from the top-level of the examples
directory) into a new folder. I can then modify the link
and script
tags in the .html
file to point to local copies of the corresponding resources. When I attempt to run tsc burtin.ts
, I get the following errors:
$ tsc burtin.ts
burtin.ts(2,16): error TS2304: Cannot find name 'Bokeh'.
burtin.ts(2,16): error TS2503: Cannot find namespace 'Bokeh'.
burtin.ts(3,27): error TS2304: Cannot find name 'Bokeh'.
burtin.ts(5,18): error TS2503: Cannot find namespace 'Bokeh'.
burtin.ts(6,16): error TS2503: Cannot find namespace 'Bokeh'.
burtin.ts(8,24): error TS2304: Cannot find name 'Bokeh'.
burtin.ts(9,3): error TS2304: Cannot find name 'Bokeh'.
burtin.ts(10,3): error TS2304: Cannot find name 'Bokeh'.
How do I tell the typescript compiler where to find Bokeh
? The tsconfig.json
in the burtin
example has the following:
{
"extends": "../tsconfig.json",
"files": [
"../../src/coffee/api/typings.d.ts",
"burtin.ts"
]
}
and perhaps the typings.d.ts
tells the compiler where to look for exported BokehJS names, but it's unclear if I need to have the full bokeh source base to compile the example (the typings.d.ts
file isn't included when you conda install bokeh
).
Any insight into how you would set up this example and run it standalone would be appreciated.
UPDATE: Even though tsc
throws the errors, it still produces a working burtin.js
and the html page displays properly. I'm just unclear if there is a more optimal way to setup the development environment.