@pnp/sp
Version:
pnp - provides a fluent api for working with SharePoint REST
16 lines • 460 B
JavaScript
/**
* Decorator used to specify the default path for SPQueryable objects
*
* @param path
*/
export function defaultPath(path) {
// eslint-disable-next-line @typescript-eslint/ban-types
return function (target) {
return class extends target {
constructor(...args) {
super(args[0], args.length > 1 && args[1] !== undefined ? args[1] : path);
}
};
};
}
//# sourceMappingURL=decorators.js.map