From 3e14aa8bfa83de97e80568549c4c90f9323a9ebf Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Mon, 5 Feb 2024 12:43:43 +0900 Subject: [PATCH] chore: fix update script to revert code format (#191) --- scripts/update-unicode-properties.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/update-unicode-properties.ts b/scripts/update-unicode-properties.ts index acb2fa6..941b40b 100644 --- a/scripts/update-unicode-properties.ts +++ b/scripts/update-unicode-properties.ts @@ -269,9 +269,9 @@ function makeClassDeclarationCode(versions: string[]): string { const fields = versions .map( (v) => - `private _raw${v}: string\nprivate _set${v}: Set | undefined`, + `private _raw${v}: string\n\nprivate _set${v}: Set | undefined`, ) - .join("\n") + .join("\n\n") const parameters = versions.map((v) => `raw${v}: string`).join(", ") const init = versions.map((v) => `this._raw${v} = raw${v}`).join("\n") const getters = versions @@ -279,14 +279,16 @@ function makeClassDeclarationCode(versions: string[]): string { (v) => `public get es${v}(): Set { return this._set${v} ?? (this._set${v} = new Set(this._raw${v}.split(" "))) }`, ) - .join("\n") + .join("\n\n") return ` class DataSet { ${fields} + public constructor(${parameters}) { ${init} } + ${getters} } `