From 1cbda217b0a9099e65b4280d1c51913d486def07 Mon Sep 17 00:00:00 2001 From: David Adams Date: Sat, 10 Sep 2022 19:55:02 +1000 Subject: [PATCH] Fix Doc type to allow interfaces The current type definition for Doc doesn't allow simple interfaces such as: interface Foo { a: string, } Expanding it to a Record type fixes this --- lib/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types.ts b/lib/types.ts index 30b4bad..baf99e0 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -68,7 +68,7 @@ export type Path = Key[] * - Functions * - Sets, Maps, Dates, DOM nodes, etc */ -export type Doc = null | boolean | number | string | Doc[] | {[k: string]: Doc} +export type Doc = null | boolean | number | string | Doc[] | Record export enum ConflictType { RM_UNEXPECTED_CONTENT = 1,