Where Tern looks for custom JSON type definitions?

Hi,

I am wondering where Tern looks for JSON type definitions. That is: if I create my custom type definition, where should I place it? (Or) There is any option I can configure to tell Tern where to find it?

Thanks

When resolving the libs option, it’ll first look in your project dir (you can include directory names in the lib names), and then in the distribution’s defs/ dir

1 Like

Thank you.

Should they have any specific file name format when placed in my project dir?

They should be called X.json, where X is the value in your libs option (may contain slashes), and contain the same structure as the built-in definition json files.

1 Like

Great! Thanks for help!