From 57b7cf271e30eb6e4d218b39d1b64dc991e28c9d Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Fri, 21 Nov 2025 02:16:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74001=20feat(s?= =?UTF-8?q?tring-pixel-width):=20add=20"Inter"=20font,=20expose=20`Setting?= =?UTF-8?q?s`=20type=20by=20@hkleungai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/string-pixel-width/index.d.ts | 49 ++++++++++--------- types/string-pixel-width/package.json | 2 +- .../string-pixel-width-tests.ts | 37 +++++++++----- 3 files changed, 51 insertions(+), 37 deletions(-) diff --git a/types/string-pixel-width/index.d.ts b/types/string-pixel-width/index.d.ts index d2484f352452db..b87a517183282e 100644 --- a/types/string-pixel-width/index.d.ts +++ b/types/string-pixel-width/index.d.ts @@ -1,27 +1,30 @@ export = getWidth; -declare function getWidth(string: string, settings?: Settings): number; +declare function getWidth(string: string, settings?: getWidth.Settings): number; -interface Settings { - bold?: boolean | undefined; - font?: - | "andale mono" - | "arial" - | "avenir" - | "avenir next" - | "comic sans ms" - | "courier new" - | "georgia" - | "helvetica" - | "impact" - | "open sans" - | "quantify" - | "tahoma" - | "times new roman" - | "trebuchet ms" - | "verdana" - | "webdings" - | undefined; - italic?: boolean | undefined; - size?: number | undefined; +declare namespace getWidth { + interface Settings { + bold?: boolean | undefined; + font?: + | "andale mono" + | "arial" + | "avenir" + | "avenir next" + | "comic sans ms" + | "courier new" + | "georgia" + | "helvetica" + | "impact" + | "inter" + | "times new roman" + | "trebuchet ms" + | "verdana" + | "webdings" + | "open sans" + | "tahoma" + | "quantify" + | undefined; + italic?: boolean | undefined; + size?: number | undefined; + } } diff --git a/types/string-pixel-width/package.json b/types/string-pixel-width/package.json index 18eb5d99dd75b0..5fabbc8c57de6f 100644 --- a/types/string-pixel-width/package.json +++ b/types/string-pixel-width/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/string-pixel-width", - "version": "1.10.9999", + "version": "1.11.9999", "projects": [ "https://github.com/adambisek/string-pixel-width#readme" ], diff --git a/types/string-pixel-width/string-pixel-width-tests.ts b/types/string-pixel-width/string-pixel-width-tests.ts index fec78c3336be6d..0b41418bf0605f 100644 --- a/types/string-pixel-width/string-pixel-width-tests.ts +++ b/types/string-pixel-width/string-pixel-width-tests.ts @@ -1,14 +1,25 @@ -import stringPixelWidth = require("string-pixel-width"); +import stringPixelWidth, { Settings } from "string-pixel-width"; -// $ExpectType number -stringPixelWidth("test"); -// $ExpectType number -stringPixelWidth("test", {}); -// $ExpectType number -stringPixelWidth("test", { bold: true }); -// $ExpectType number -stringPixelWidth("test", { font: "arial" }); -// $ExpectType number -stringPixelWidth("test", { italic: true }); -// $ExpectType number -stringPixelWidth("test", { size: 10 }); +let x: number; +x = stringPixelWidth("test"); +x = stringPixelWidth("test", {} satisfies Settings); +x = stringPixelWidth("test", { bold: true }); +x = stringPixelWidth("test", { italic: true }); +x = stringPixelWidth("test", { size: 10 }); +x = stringPixelWidth("test", { font: "andale mono" }); +x = stringPixelWidth("test", { font: "arial" }); +x = stringPixelWidth("test", { font: "avenir" }); +x = stringPixelWidth("test", { font: "avenir next" }); +x = stringPixelWidth("test", { font: "comic sans ms" }); +x = stringPixelWidth("test", { font: "courier new" }); +x = stringPixelWidth("test", { font: "georgia" }); +x = stringPixelWidth("test", { font: "helvetica" }); +x = stringPixelWidth("test", { font: "impact" }); +x = stringPixelWidth("test", { font: "inter" }); +x = stringPixelWidth("test", { font: "times new roman" }); +x = stringPixelWidth("test", { font: "trebuchet ms" }); +x = stringPixelWidth("test", { font: "verdana" }); +x = stringPixelWidth("test", { font: "webdings" }); +x = stringPixelWidth("test", { font: "open sans" }); +x = stringPixelWidth("test", { font: "tahoma" }); +x = stringPixelWidth("test", { font: "quantify" }); From 5b1d071af1103671fd5e33222ae9d1d79aa768fb Mon Sep 17 00:00:00 2001 From: Sam Ramon <15154970+samantharamon@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:06:31 -0800 Subject: [PATCH 2/3] [office-js][office-js-preview] (Outlook) Document Markdown support for the Smart Alerts dialog in Outlook on Mac (#74073) --- types/office-js-preview/index.d.ts | 4 ++++ types/office-js/index.d.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 527056a233473c..edcc9efabe49aa 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -24625,6 +24625,10 @@ declare namespace Office { * * **Important** * + * - The `errorMessageMarkdown` property is available for preview in Outlook on Mac starting in Version 16.103 (Build 25102433). To test the property, join the + * {@link https://techcommunity.microsoft.com/kb/microsoft-365-insider-kb/join-the-microsoft-365-insider-program-on-macos/4401756 | Microsoft 365 Insider program} and + * select the **Beta Channel** option to access Office beta builds. + * * - The formatted error message must be 500 characters or less. * * - For guidance on supported Markdown elements, see diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 3cc34e1c599a0d..55b14b089f05bd 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -23846,6 +23846,10 @@ declare namespace Office { * * **Important** * + * - The `errorMessageMarkdown` property is available for preview in Outlook on Mac starting in Version 16.103 (Build 25102433). To test the property, join the + * {@link https://techcommunity.microsoft.com/kb/microsoft-365-insider-kb/join-the-microsoft-365-insider-program-on-macos/4401756 | Microsoft 365 Insider program} and + * select the **Beta Channel** option to access Office beta builds. + * * - The formatted error message must be 500 characters or less. * * - For guidance on supported Markdown elements, see From 999d5c3c7b2b7efb4f525c136b8d44ab011ad100 Mon Sep 17 00:00:00 2001 From: Ryan Gibbs <43744667+ryangibbsnc@users.noreply.github.com> Date: Thu, 20 Nov 2025 22:41:51 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73956=20fix(br?= =?UTF-8?q?aintree):=20Add=20missing=20Braintree=20plan=20/=20error=20type?= =?UTF-8?q?s=20and=20update=20i=E2=80=A6=20by=20@ryangibbsnc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/braintree/braintree-tests.ts | 2 +- types/braintree/index.d.ts | 94 ++++++++++++++++++++++++------ 2 files changed, 77 insertions(+), 19 deletions(-) diff --git a/types/braintree/braintree-tests.ts b/types/braintree/braintree-tests.ts index 74600c0c3670b7..ce4851a47fa9bd 100644 --- a/types/braintree/braintree-tests.ts +++ b/types/braintree/braintree-tests.ts @@ -246,7 +246,7 @@ const gateway: BraintreeGateway = new braintree.BraintreeGateway({ // Plan Gateway (async () => { - // $ExpectType { plans: Plan[]; } + // $ExpectType Plan[]; await gateway.plan.all(); })(); diff --git a/types/braintree/index.d.ts b/types/braintree/index.d.ts index 95fc8e5abfc5b8..5591f1004c0f62 100644 --- a/types/braintree/index.d.ts +++ b/types/braintree/index.d.ts @@ -120,6 +120,10 @@ declare namespace braintree { voidedAt: RangeFieldSearchFn; }) => void; + export type DisputeSearchFn = (search: { + status: MultiValueSearchFn; + }) => void; + export type GatewayConfig = KeyGatewayConfig | ClientGatewayConfig | AccessTokenGatewayConfig; export class Environment { @@ -262,7 +266,7 @@ declare namespace braintree { finalize(disputeId: string): Promise>; find(disputeId: string): Promise; removeEvidence(disputeId: string, evidenceId: string): Promise>; - search(searchFn: any): stream.Readable; + search(searchFn: DisputeSearchFn): stream.Readable; } interface MerchantAccountGateway { @@ -307,7 +311,10 @@ declare namespace braintree { } interface PlanGateway { - all(): Promise<{ plans: Plan[] }>; + all(): Promise; + find(planId: string): Promise; + create(request: PlanCreateRequest): Promise>; + update(planId: string, updates: PlanCreateRequest): Promise>; } interface SettlementBatchSummaryGateway { @@ -318,14 +325,14 @@ declare namespace braintree { } interface SubscriptionGateway { - cancel(subscriptionId: string): Promise; + cancel(subscriptionId: string): Promise; create(request: SubscriptionCreateRequest): Promise>; find(subscriptionId: string): Promise; retryCharge( subscriptionId: string, amount?: string, submitForSettlement?: boolean, - ): Promise>; + ): Promise>; search(searchFn: any): stream.Readable; update(subscriptionId: string, updates: SubscriptionUpdateRequest): Promise>; } @@ -1269,6 +1276,36 @@ declare namespace braintree { updatedAt: string; } + export interface PlanCreateRequest { + addOns?: + | { + add?: AddOnAddRequest[] | undefined; + remove?: string[] | undefined; + update?: AddOnUpdateRequest[] | undefined; + }[] + | undefined; + billingDayOfMonth?: number | string | undefined; + billingFrequency: number | string; + currencyIsoCode: string; + description?: string | undefined; + discounts?: + | { + add?: DiscountAddRequest[] | undefined; + remove?: string[] | undefined; + update?: DiscountUpdateRequest[] | undefined; + }[] + | undefined; + id?: string | undefined; + modificationTokens?: string | undefined; + name: string; + neverExpires?: boolean | string | undefined; + numberOfBillingCycles?: number | string | undefined; + price: string | number; + trialDuration?: number | undefined; + trialDurationUnit?: string | undefined; + trialPeriod?: boolean | undefined; + } + /** * Settlement Batch Summary */ @@ -2306,20 +2343,41 @@ declare namespace braintree { * Errors */ - export interface AuthenticationError extends Error {} - export interface AuthorizationError extends Error {} - export interface GatewayTimeoutError extends Error {} - export interface InvalidChallengeError extends Error {} - export interface InvalidKeysError extends Error {} - export interface InvalidSignatureError extends Error {} - export interface NotFoundError extends Error {} - export interface RequestTimeoutError extends Error {} - export interface ServerError extends Error {} - export interface ServiceUnavailableError extends Error {} - export interface TestOperationPerformedInProductionError extends Error {} - export interface TooManyRequestsError extends Error {} - export interface UnexpectedError extends Error {} - export interface UpgradeRequired extends Error {} + type ErrorType = + | "authenticationError" + | "authorizationError" + | "gatewayTimeoutError" + | "invalidChallengeError" + | "invalidKeysError" + | "invalidSignatureError" + | "notFoundError" + | "requestTimeoutError" + | "serverError" + | "serviceUnavailableError" + | "testOperationPerformedInProductionError" + | "tooManyRequestsError" + | "unexpectedError" + | "upgradeRequired"; + + export interface BraintreeError extends Error { + type: T; + } + export interface AuthenticationError extends BraintreeError<"authenticationError"> {} + export interface AuthorizationError extends BraintreeError<"authorizationError"> {} + export interface GatewayTimeoutError extends BraintreeError<"gatewayTimeoutError"> {} + export interface InvalidChallengeError extends BraintreeError<"invalidChallengeError"> {} + export interface InvalidKeysError extends BraintreeError<"invalidKeysError"> {} + export interface InvalidSignatureError extends BraintreeError<"invalidSignatureError"> {} + export interface NotFoundError extends BraintreeError<"notFoundError"> {} + export interface RequestTimeoutError extends BraintreeError<"requestTimeoutError"> {} + export interface ServerError extends BraintreeError<"serverError"> {} + export interface ServiceUnavailableError extends BraintreeError<"serviceUnavailableError"> {} + export interface TestOperationPerformedInProductionError + extends BraintreeError<"testOperationPerformedInProductionError"> + {} + export interface TooManyRequestsError extends BraintreeError<"tooManyRequestsError"> {} + export interface UnexpectedError extends BraintreeError<"unexpectedError"> {} + export interface UpgradeRequired extends BraintreeError<"upgradeRequired"> {} /** * Validation errors