mirror of
https://github.com/denoland/deno.git
synced 2024-12-28 18:19:08 -05:00
82aabb657a
This commit adds a "--no-check" option to following subcommands: - "deno cache" - "deno info" - "deno run" - "deno test" The "--no-check" options allows to skip type checking step and instead directly transpiles TS sources to JS sources. This solution uses `ts.transpileModule()` API and is just an interim solution before implementing it fully in Rust.
18 lines
657 B
TypeScript
18 lines
657 B
TypeScript
// Ported from js-yaml v3.13.1:
|
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
|
|
|
import { dump } from "./dumper/dumper.ts";
|
|
import type { DumperStateOptions } from "./dumper/dumper_state.ts";
|
|
|
|
export type DumpOptions = DumperStateOptions;
|
|
|
|
/**
|
|
* Serializes `object` as a YAML document.
|
|
*
|
|
* You can disable exceptions by setting the skipInvalid option to true.
|
|
*/
|
|
export function stringify(obj: object, options?: DumpOptions): string {
|
|
return dump(obj, options);
|
|
}
|