How would I write a declaration file for
define(function() {
'use strict';
return Object.freeze({
BTN_LINK: 'btnLink',
COMBO_BOX: 'comboBox',
TEXT: 'text'
});
});
How would I write a declaration file for
define(function() {
'use strict';
return Object.freeze({
BTN_LINK: 'btnLink',
COMBO_BOX: 'comboBox',
TEXT: 'text'
});
});
The type of the object you have frozen is:
You can get some guidance on best practices, and detailed instructions on writing type definitions if you want to find out more about ambient types. In particular, the best practices link describes how to create ghost modules, which you will be interested in if you want to put this type into a ghost module to describe the whole file.