Socket
Socket
Sign inDemoInstall

@types/js-yaml

Package Overview
Dependencies
0
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.12.3 to 3.12.4

150

js-yaml/index.d.ts

@@ -15,11 +15,11 @@ // Type definitions for js-yaml 3.12

export class Type {
constructor(tag: string, opts?: TypeConstructorOptions);
kind: 'sequence' | 'scalar' | 'mapping' | null;
resolve(data: any): boolean;
construct(data: any): any;
instanceOf: object | null;
predicate: ((data: object) => boolean) | null;
represent: ((data: object) => any) | { [x: string]: (data: object) => any } | null;
defaultStyle: string | null;
styleAliases: { [x: string]: any };
constructor(tag: string, opts?: TypeConstructorOptions);
kind: 'sequence' | 'scalar' | 'mapping' | null;
resolve(data: any): boolean;
construct(data: any): any;
instanceOf: object | null;
predicate: ((data: object) => boolean) | null;
represent: ((data: object) => any) | { [x: string]: (data: object) => any } | null;
defaultStyle: string | null;
styleAliases: { [x: string]: any };
}

@@ -29,5 +29,5 @@

export class Schema implements SchemaDefinition {
constructor(definition: SchemaDefinition);
static create(types: Type[] | Type): Schema;
static create(schemas: Schema[] | Schema, types: Type[] | Type): Schema;
constructor(definition: SchemaDefinition);
static create(types: Type[] | Type): Schema;
static create(schemas: Schema[] | Schema, types: Type[] | Type): Schema;
}

@@ -45,12 +45,12 @@

export interface LoadOptions {
/** string to be used as a file path in error/warning messages. */
filename?: string;
/** function to call on warning messages. */
onWarning?(this: null, e: YAMLException): void;
/** specifies a schema to use. */
schema?: SchemaDefinition;
/** compatibility with JSON.parse behaviour. */
json?: boolean;
/** listener for parse events */
listener?(this: State, eventType: EventType, state: State): void;
/** string to be used as a file path in error/warning messages. */
filename?: string;
/** function to call on warning messages. */
onWarning?(this: null, e: YAMLException): void;
/** specifies a schema to use. */
schema?: SchemaDefinition;
/** compatibility with JSON.parse behaviour. */
json?: boolean;
/** listener for parse events */
listener?(this: State, eventType: EventType, state: State): void;
}

@@ -61,62 +61,62 @@

export interface State {
input: string;
filename: string | null;
schema: SchemaDefinition;
onWarning: (this: null, e: YAMLException) => void;
json: boolean;
length: number;
position: number;
line: number;
lineStart: number;
lineIndent: number;
version: null | number;
checkLineBreaks: boolean;
kind: string;
result: any;
implicitTypes: Type[];
input: string;
filename: string | null;
schema: SchemaDefinition;
onWarning: (this: null, e: YAMLException) => void;
json: boolean;
length: number;
position: number;
line: number;
lineStart: number;
lineIndent: number;
version: null | number;
checkLineBreaks: boolean;
kind: string;
result: any;
implicitTypes: Type[];
}
export interface DumpOptions {
/** indentation width to use (in spaces). */
indent?: number;
/** when true, will not add an indentation level to array elements */
noArrayIndent?: boolean;
/** do not throw on invalid types (like function in the safe schema) and skip pairs and single values with such types. */
skipInvalid?: boolean;
/** specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere */
flowLevel?: number;
/** Each tag may have own set of styles. - "tag" => "style" map. */
styles?: { [x: string]: any };
/** specifies a schema to use. */
schema?: SchemaDefinition;
/** if true, sort keys when dumping YAML. If a function, use the function to sort the keys. (default: false) */
sortKeys?: boolean | ((a: any, b: any) => number);
/** set max line width. (default: 80) */
lineWidth?: number;
/** if true, don't convert duplicate objects into references (default: false) */
noRefs?: boolean;
/** if true don't try to be compatible with older yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 (default: false) */
noCompatMode?: boolean;
/**
* if true flow sequences will be condensed, omitting the space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`.
* Can be useful when using yaml for pretty URL query params as spaces are %-encoded. (default: false).
*/
condenseFlow?: boolean;
/** indentation width to use (in spaces). */
indent?: number;
/** when true, will not add an indentation level to array elements */
noArrayIndent?: boolean;
/** do not throw on invalid types (like function in the safe schema) and skip pairs and single values with such types. */
skipInvalid?: boolean;
/** specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere */
flowLevel?: number;
/** Each tag may have own set of styles. - "tag" => "style" map. */
styles?: { [x: string]: any };
/** specifies a schema to use. */
schema?: SchemaDefinition;
/** if true, sort keys when dumping YAML. If a function, use the function to sort the keys. (default: false) */
sortKeys?: boolean | ((a: any, b: any) => number);
/** set max line width. (default: 80) */
lineWidth?: number;
/** if true, don't convert duplicate objects into references (default: false) */
noRefs?: boolean;
/** if true don't try to be compatible with older yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 (default: false) */
noCompatMode?: boolean;
/**
* if true flow sequences will be condensed, omitting the space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`.
* Can be useful when using yaml for pretty URL query params as spaces are %-encoded. (default: false).
*/
condenseFlow?: boolean;
}
export interface TypeConstructorOptions {
kind?: 'sequence' | 'scalar' | 'mapping';
resolve?: (data: any) => boolean;
construct?: (data: any) => any;
instanceOf?: object;
predicate?: (data: object) => boolean;
represent?: ((data: object) => any) | { [x: string]: (data: object) => any };
defaultStyle?: string;
styleAliases?: { [x: string]: any };
kind?: 'sequence' | 'scalar' | 'mapping';
resolve?: (data: any) => boolean;
construct?: (data: any) => any;
instanceOf?: object;
predicate?: (data: object) => boolean;
represent?: ((data: object) => any) | { [x: string]: (data: object) => any };
defaultStyle?: string;
styleAliases?: { [x: string]: any };
}
export interface SchemaDefinition {
implicit?: any[];
explicit?: Type[];
include?: Schema[];
implicit?: any[];
explicit?: Type[];
include?: Schema[];
}

@@ -138,4 +138,4 @@

export class YAMLException extends Error {
constructor(reason?: any, mark?: any);
toString(compact?: boolean): string;
constructor(reason?: any, mark?: any);
toString(compact?: boolean): string;
}
{
"name": "@types/js-yaml",
"version": "3.12.3",
"version": "3.12.4",
"description": "TypeScript definitions for js-yaml",

@@ -32,4 +32,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "b87ebac9c59b4eb1a82542ce04a00472f282a54bdf4bd8c4fec5dae249ba79ea",
"typeScriptVersion": "2.8"
"typesPublisherContentHash": "035f0fbf1d5a10e72bc6cead9a2d15cd9d3eb57eff96afcc22b598511b9050b5",
"typeScriptVersion": "3.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Wed, 25 Mar 2020 04:16:20 GMT
* Last updated: Fri, 15 May 2020 04:09:49 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `jsyaml`

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc