Skip to content

Commit

Permalink
ts: Minor fixes to optional arg types
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Apr 17, 2020
1 parent 663acc1 commit d9e093b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class Document extends AST.Collection {
/** Set `handle` as a shorthand string for the `prefix` tag namespace. */
setTagPrefix(handle: string, prefix: string): void
/** A plain JavaScript representation of the document `contents`. */
toJSON(arg: any): any
toJSON(arg?: any): any
/** A YAML representation of the document. */
toString(): string
}
Expand Down
8 changes: 4 additions & 4 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ export class Schema {
* Convert any value into a `Node` using this schema, recursively turning
* objects into collectsions.
*
* @param wrapScalars If undefined or `true`, also wraps plain values in
* `Scalar` objects; if `false` and `value` is not an object, it will be
* returned directly.
* @param wrapScalars If `true`, also wraps plain values in `Scalar` objects;
* if undefined or `false` and `value` is not an object, it will be returned
* directly.
* @param tag Use to specify the collection type, e.g. `"!!omap"`. Note that
* this requires the corresponding tag to be available in this schema.
*/
createNode(
value: any,
wrapScalars: boolean,
wrapScalars?: boolean,
tag?: string,
ctx?: Schema.CreateNodeContext
): AST.Node
Expand Down

0 comments on commit d9e093b

Please sign in to comment.