trace_state.d.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. export interface TraceState {
  2. /**
  3. * Create a new TraceState which inherits from this TraceState and has the
  4. * given key set.
  5. * The new entry will always be added in the front of the list of states.
  6. *
  7. * @param key key of the TraceState entry.
  8. * @param value value of the TraceState entry.
  9. */
  10. set(key: string, value: string): TraceState;
  11. /**
  12. * Return a new TraceState which inherits from this TraceState but does not
  13. * contain the given key.
  14. *
  15. * @param key the key for the TraceState entry to be removed.
  16. */
  17. unset(key: string): TraceState;
  18. /**
  19. * Returns the value to which the specified key is mapped, or `undefined` if
  20. * this map contains no mapping for the key.
  21. *
  22. * @param key with which the specified value is to be associated.
  23. * @returns the value to which the specified key is mapped, or `undefined` if
  24. * this map contains no mapping for the key.
  25. */
  26. get(key: string): string | undefined;
  27. /**
  28. * Serializes the TraceState to a `list` as defined below. The `list` is a
  29. * series of `list-members` separated by commas `,`, and a list-member is a
  30. * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
  31. * surrounding `list-members` are ignored. There can be a maximum of 32
  32. * `list-members` in a `list`.
  33. *
  34. * @returns the serialized string.
  35. */
  36. serialize(): string;
  37. }
  38. //# sourceMappingURL=trace_state.d.ts.map