summaryrefslogtreecommitdiff
path: root/MistyCore/node_modules/yaml/dist/public-api.d.ts
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-11-28 17:31:34 +0100
committerMinteck <contact@minteck.org>2022-11-28 17:31:34 +0100
commit7923aa8942b55884320ef2428417e3ee4b121613 (patch)
tree7993632f2898b1998f25b11ce40a8d2eb3d44730 /MistyCore/node_modules/yaml/dist/public-api.d.ts
downloadmistyos-og-7923aa8942b55884320ef2428417e3ee4b121613.tar.gz
mistyos-og-7923aa8942b55884320ef2428417e3ee4b121613.tar.bz2
mistyos-og-7923aa8942b55884320ef2428417e3ee4b121613.zip
Initial commitHEADmane
Diffstat (limited to 'MistyCore/node_modules/yaml/dist/public-api.d.ts')
-rw-r--r--MistyCore/node_modules/yaml/dist/public-api.d.ts43
1 files changed, 43 insertions, 0 deletions
diff --git a/MistyCore/node_modules/yaml/dist/public-api.d.ts b/MistyCore/node_modules/yaml/dist/public-api.d.ts
new file mode 100644
index 0000000..82a4d4f
--- /dev/null
+++ b/MistyCore/node_modules/yaml/dist/public-api.d.ts
@@ -0,0 +1,43 @@
+import { Composer } from './compose/composer.js';
+import type { Reviver } from './doc/applyReviver.js';
+import { Document, Replacer } from './doc/Document.js';
+import type { ParsedNode } from './nodes/Node.js';
+import type { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, ToStringOptions } from './options.js';
+export interface EmptyStream extends Array<Document.Parsed>, ReturnType<Composer['streamInfo']> {
+ empty: true;
+}
+/**
+ * Parse the input as a stream of YAML documents.
+ *
+ * Documents should be separated from each other by `...` or `---` marker lines.
+ *
+ * @returns If an empty `docs` array is returned, it will be of type
+ * EmptyStream and contain additional stream information. In
+ * TypeScript, you should use `'empty' in docs` as a type guard for it.
+ */
+export declare function parseAllDocuments<T extends ParsedNode = ParsedNode>(source: string, options?: ParseOptions & DocumentOptions & SchemaOptions): Document.Parsed<T>[] | EmptyStream;
+/** Parse an input string into a single YAML.Document */
+export declare function parseDocument<T extends ParsedNode = ParsedNode>(source: string, options?: ParseOptions & DocumentOptions & SchemaOptions): Document.Parsed<T>;
+/**
+ * Parse an input string into JavaScript.
+ *
+ * Only supports input consisting of a single YAML document; for multi-document
+ * support you should use `YAML.parseAllDocuments`. May throw on error, and may
+ * log warnings using `console.warn`.
+ *
+ * @param str - A string with YAML formatting.
+ * @param reviver - A reviver function, as in `JSON.parse()`
+ * @returns The value will match the type of the root value of the parsed YAML
+ * document, so Maps become objects, Sequences arrays, and scalars result in
+ * nulls, booleans, numbers and strings.
+ */
+export declare function parse(src: string, options?: ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions): any;
+export declare function parse(src: string, reviver: Reviver, options?: ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions): any;
+/**
+ * Stringify a value as a YAML document.
+ *
+ * @param replacer - A replacer array or function, as in `JSON.stringify()`
+ * @returns Will always include `\n` as the last character, as is expected of YAML documents.
+ */
+export declare function stringify(value: any, options?: DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions & ToStringOptions): string;
+export declare function stringify(value: any, replacer?: Replacer | null, options?: string | number | (DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions & ToStringOptions)): string;