yaml 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,10 +9,12 @@ import type { YAMLSeq } from './YAMLSeq.js';
9
9
  export declare type Node<T = unknown> = Alias | Scalar<T> | YAMLMap<unknown, T> | YAMLSeq<T>;
10
10
  /** Utility type mapper */
11
11
  export declare type NodeType<T> = T extends string | number | bigint | boolean | null ? Scalar<T> : T extends Array<any> ? YAMLSeq<NodeType<T[number]>> : T extends {
12
- [key: string | number]: any;
12
+ [key: string]: any;
13
+ } ? YAMLMap<NodeType<keyof T>, NodeType<T[keyof T]>> : T extends {
14
+ [key: number]: any;
13
15
  } ? YAMLMap<NodeType<keyof T>, NodeType<T[keyof T]>> : Node;
14
16
  export declare type ParsedNode = Alias.Parsed | Scalar.Parsed | YAMLMap.Parsed | YAMLSeq.Parsed;
15
- export declare type Range = [start: number, valueEnd: number, nodeEnd: number];
17
+ export declare type Range = [number, number, number];
16
18
  export declare const ALIAS: unique symbol;
17
19
  export declare const DOC: unique symbol;
18
20
  export declare const MAP: unique symbol;
@@ -10,9 +10,9 @@ export declare class Schema {
10
10
  sortMapEntries: ((a: Pair, b: Pair) => number) | null;
11
11
  tags: Array<CollectionTag | ScalarTag>;
12
12
  toStringOptions: Readonly<ToStringOptions> | null;
13
- [MAP]: CollectionTag;
14
- [SCALAR]: ScalarTag;
15
- [SEQ]: CollectionTag;
13
+ readonly [MAP]: CollectionTag;
14
+ readonly [SCALAR]: ScalarTag;
15
+ readonly [SEQ]: CollectionTag;
16
16
  constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }: SchemaOptions);
17
17
  clone(): Schema;
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaml",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "license": "ISC",
5
5
  "author": "Eemeli Aro <eemeli@gmail.com>",
6
6
  "repository": "github:eemeli/yaml",