New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsdoc for globalThis #2093
Comments
Jsdoc doesn't support to add dynamic property of object if (undefined === globalThis.using) {
/**
* @type {object}
*/
globalThis.using = {};
}
/**
* what is jsdoc at here ?
*/
const addProperty = (key, value) => {
globalThis.using[key] = value;
};
const setUsing = obj => {
Object.keys(obj).each(key => {
// do something to jsdoc logs dynamic new property
// Object.assign(globalThis.using, { [key]: obj[key] });
// or jsdoc probable logs new property like this
// globalThis.using[key] = obj[key];
// or jsdoc logs new property from callback
addProperty(key, obj[key]);
});
};
const listMethods = { computing: () => {}, makeBlock: () => {} };
setUsing(listMethods); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i want
The text was updated successfully, but these errors were encountered: