find.d.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * Look up info on a property.
  3. *
  4. * In most cases the given `schema` contains info on the property.
  5. * All standard,
  6. * most legacy,
  7. * and some non-standard properties are supported.
  8. * For these cases,
  9. * the returned `Info` has hints about the value of the property.
  10. *
  11. * `name` can also be a valid data attribute or property,
  12. * in which case an `Info` object with the correctly cased `attribute` and
  13. * `property` is returned.
  14. *
  15. * `name` can be an unknown attribute,
  16. * in which case an `Info` object with `attribute` and `property` set to the
  17. * given name is returned.
  18. * It is not recommended to provide unsupported legacy or recently specced
  19. * properties.
  20. *
  21. *
  22. * @param {Schema} schema
  23. * Schema;
  24. * either the `html` or `svg` export.
  25. * @param {string} value
  26. * An attribute-like or property-like name;
  27. * it will be passed through `normalize` to hopefully find the correct info.
  28. * @returns {Info}
  29. * Info.
  30. */
  31. export function find(schema: Schema, value: string): Info;
  32. import type { Schema } from 'property-information';
  33. import { Info } from './util/info.js';
  34. //# sourceMappingURL=find.d.ts.map