Experimentally (?) use fromJS in stringify
This commit is contained in:
parent
21de8b799a
commit
356ff74058
|
@ -28,7 +28,7 @@ export const stringifyEmbeddedWrite: EmbeddedWriter<any> = {
|
|||
export function stringify<T = GenericEmbedded>(x: any, options?: WriterOptions<T>): string {
|
||||
options = { ... (options ?? {}) };
|
||||
options.embeddedWrite = options.embeddedWrite ?? stringifyEmbeddedWrite;
|
||||
return Writer.stringify(x as Writable<T>, options);
|
||||
return Writer.stringify(fromJS<T>(x), options);
|
||||
}
|
||||
|
||||
export function preserves<T>(pieces: TemplateStringsArray, ...values: Value<T>[]): string {
|
||||
|
|
Loading…
Reference in New Issue