From 968065ca734fa25897535b45deebf90d622e89da Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Fri, 23 Feb 2024 20:27:10 -0800 Subject: [PATCH] Bun.stringWidth ambiguousIsNarrow option defaults to true (#9064) * Bun.stringWidth ambiguousIsNarrow option defaults to true * number was backwards too --- docs/api/utils.md | 4 ++-- packages/bun-types/bun.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/utils.md b/docs/api/utils.md index 6b239989e9..600b5dcd0c 100644 --- a/docs/api/utils.md +++ b/docs/api/utils.md @@ -390,9 +390,9 @@ namespace Bun { */ countAnsiEscapeCodes?: boolean; /** - * When it's ambiugous and `true`, count emoji as 2 characters wide. If `false`, emoji are counted as 1 character wide. + * When it's ambiugous and `true`, count emoji as 1 characters wide. If `false`, emoji are counted as 2 character wide. * - * @default false + * @default true */ ambiguousIsNarrow?: boolean; }, diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index c98a45dd34..c9f703290f 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -87,9 +87,9 @@ declare module "bun" { */ countAnsiEscapeCodes?: boolean; /** - * When it's ambiugous and `true`, count emoji as 2 characters wide. If `false`, emoji are counted as 1 character wide. + * When it's ambiugous and `true`, count emoji as 1 characters wide. If `false`, emoji are counted as 2 character wide. * - * @default false + * @default true */ ambiguousIsNarrow?: boolean; },