You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.1 KiB

1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /**
  2. * Creates a Proxy for resolving raw values for options.
  3. * @param {object[]} scopes - The option scopes to look for values, in resolution order
  4. * @param {string[]} [prefixes] - The prefixes for values, in resolution order.
  5. * @param {object[]} [rootScopes] - The root option scopes
  6. * @param {string|boolean} [fallback] - Parent scopes fallback
  7. * @param {function} [getTarget] - callback for getting the target for changed values
  8. * @returns Proxy
  9. * @private
  10. */
  11. export function _createResolver(scopes: object[], prefixes?: string[], rootScopes?: object[], fallback?: string | boolean, getTarget?: Function): {
  12. [Symbol.toStringTag]: string;
  13. _cacheable: boolean;
  14. _scopes: any[];
  15. _rootScopes: any[];
  16. _fallback: string | boolean;
  17. _getTarget: Function;
  18. override: (scope: any) => any;
  19. };
  20. /**
  21. * Returns an Proxy for resolving option values with context.
  22. * @param {object} proxy - The Proxy returned by `_createResolver`
  23. * @param {object} context - Context object for scriptable/indexable options
  24. * @param {object} [subProxy] - The proxy provided for scriptable options
  25. * @param {{scriptable: boolean, indexable: boolean, allKeys?: boolean}} [descriptorDefaults] - Defaults for descriptors
  26. * @private
  27. */
  28. export function _attachContext(proxy: object, context: object, subProxy?: object, descriptorDefaults?: {
  29. scriptable: boolean;
  30. indexable: boolean;
  31. allKeys?: boolean;
  32. }): {
  33. _cacheable: boolean;
  34. _proxy: any;
  35. _context: any;
  36. _subProxy: any;
  37. _stack: Set<any>;
  38. _descriptors: {
  39. allKeys: any;
  40. scriptable: any;
  41. indexable: any;
  42. isScriptable: (...args: any[]) => any;
  43. isIndexable: (...args: any[]) => any;
  44. };
  45. setContext: (ctx: any) => any;
  46. override: (scope: any) => any;
  47. };
  48. /**
  49. * @private
  50. */
  51. export function _descriptors(proxy: any, defaults?: {
  52. scriptable: boolean;
  53. indexable: boolean;
  54. }): {
  55. allKeys: any;
  56. scriptable: any;
  57. indexable: any;
  58. isScriptable: (...args: any[]) => any;
  59. isIndexable: (...args: any[]) => any;
  60. };
  61. export function _parseObjectDataRadialScale(meta: any, data: any, start: any, count: any): any[];