tern
tern copied to clipboard
require.js + defs
Hi,
what should be the right config for such scenario below with require.js defs + type recognition?
define(["my/lib/Cart"],
function(Cart) {
var cart = new Cart();
cart //<-- here I try to get the type of cart with "type" query
I want to bring my own definition of Cart with JSON type defiition - should it be done with override option of the requirejs plugin?
new tern.Server({
"plugins": {
"requirejs": {
"override": {
"my/lib/Cart": <my JSON type object>
...
or should it be with additional paths option?
new tern.Server({
"plugins": {
"requirejs": {
"override": {
"Cart": <my JSON type object>
},
paths: { "Cart": "my/lib" }
....
Regards, Jacek