From 8f27dd0c8bbfa48281f23690cffe42f53ddc9c35 Mon Sep 17 00:00:00 2001 From: Weiran Ye Date: Mon, 19 Feb 2024 22:03:15 -0800 Subject: [PATCH 1/6] fix docs serializeAsJSON signature --- .../docs/@excalidraw/excalidraw/api/utils/utils-intro.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md index 69bd88a83..b95bdc12a 100644 --- a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md +++ b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md @@ -15,9 +15,11 @@ If you want to overwrite the `source` field in the `JSON` string, you can set `w **_Signature_**
-serializeAsJSON({
  - elements: ExcalidrawElement[],
  - appState: AppState,
+serializeAsJSON({ + elements: ExcalidrawElement[], + appState: AppState, + files: BinaryFiles, + type: "local" | "database" }): string
From a6140063426ac7137813e5a4732041c1142c88a1 Mon Sep 17 00:00:00 2001 From: Weiran Ye Date: Mon, 19 Feb 2024 22:33:25 -0800 Subject: [PATCH 2/6] escape double quotes --- dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md index b95bdc12a..974d00d71 100644 --- a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md +++ b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md @@ -19,7 +19,7 @@ serializeAsJSON({ elements: ExcalidrawElement[], appState: AppState, files: BinaryFiles, - type: "local" | "database" + type: "local" | "database" }): string From 078ac1c25982ebfe59a39cf97df212d3a54a2011 Mon Sep 17 00:00:00 2001 From: Weiran Ye Date: Mon, 19 Feb 2024 22:39:30 -0800 Subject: [PATCH 3/6] escape start curly brace --- dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md index 974d00d71..676b521e6 100644 --- a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md +++ b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md @@ -15,7 +15,7 @@ If you want to overwrite the `source` field in the `JSON` string, you can set `w **_Signature_**
-serializeAsJSON({
+serializeAsJSON({
   elements: ExcalidrawElement[],
   appState: AppState,
   files: BinaryFiles,

From f2cbe231b813aa6ab413f22b22f5b0214c712969 Mon Sep 17 00:00:00 2001
From: Weiran Ye 
Date: Mon, 19 Feb 2024 22:46:52 -0800
Subject: [PATCH 4/6] param type correction

---
 .../docs/@excalidraw/excalidraw/api/utils/utils-intro.md    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md
index 676b521e6..cd8592adc 100644
--- a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md
+++ b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md
@@ -15,12 +15,12 @@ If you want to overwrite the `source` field in the `JSON` string, you can set `w
 **_Signature_**
 
 
-serializeAsJSON({
+serializeAsJSON(
   elements: ExcalidrawElement[],
   appState: AppState,
   files: BinaryFiles,
-  type: "local" | "database"
-}): string
+  type: "local" | "database"
+): string
 
**How to use** From 44e1c4dd7c70f189946fafd17a640dfacccebe5d Mon Sep 17 00:00:00 2001 From: Weiran Ye Date: Mon, 19 Feb 2024 22:52:20 -0800 Subject: [PATCH 5/6] add line breaks --- .../@excalidraw/excalidraw/api/utils/utils-intro.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md index cd8592adc..3bc10f97c 100644 --- a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md +++ b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md @@ -15,11 +15,11 @@ If you want to overwrite the `source` field in the `JSON` string, you can set `w **_Signature_**
-serializeAsJSON(
-  elements: ExcalidrawElement[],
-  appState: AppState,
-  files: BinaryFiles,
-  type: "local" | "database"
+serializeAsJSON(
  + elements: ExcalidrawElement[],
  + appState: AppState,
  + files: BinaryFiles,
  + type: "local" | "database"
  ): string
From b86d0a28f83ab8a2ba3ce5039efb4338dfbfbd7d Mon Sep 17 00:00:00 2001 From: Weiran Ye Date: Mon, 19 Feb 2024 22:58:38 -0800 Subject: [PATCH 6/6] remove extra indentation --- dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md index 3bc10f97c..8b5cb6227 100644 --- a/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md +++ b/dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md @@ -19,7 +19,7 @@ serializeAsJSON(
  elements: ExcalidrawElement[],
  appState: AppState,
  files: BinaryFiles,
  - type: "local" | "database"
  + type: "local" | "database"
): string