From b8b221f8960708d84fe1fdf8e1a1e4dc08676cbf Mon Sep 17 00:00:00 2001 From: joseph-neeraj Date: Fri, 3 Apr 2026 12:28:15 +0100 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74812=20[maste?= =?UTF-8?q?rcard-oauth1-signer]=20remove=20mastercard-oauth1-signer=20type?= =?UTF-8?q?s=20by=20@joseph-neeraj?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notNeededPackages.json | 4 ++++ types/mastercard-oauth1-signer/.npmignore | 5 ----- types/mastercard-oauth1-signer/index.d.ts | 15 --------------- .../mastercard-oauth1-signer-tests.ts | 4 ---- types/mastercard-oauth1-signer/package.json | 17 ----------------- types/mastercard-oauth1-signer/tsconfig.json | 19 ------------------- 6 files changed, 4 insertions(+), 60 deletions(-) delete mode 100644 types/mastercard-oauth1-signer/.npmignore delete mode 100644 types/mastercard-oauth1-signer/index.d.ts delete mode 100644 types/mastercard-oauth1-signer/mastercard-oauth1-signer-tests.ts delete mode 100644 types/mastercard-oauth1-signer/package.json delete mode 100644 types/mastercard-oauth1-signer/tsconfig.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 63a51318385296..887873d2403a32 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -4145,6 +4145,10 @@ "libraryName": "marked", "asOfVersion": "6.0.0" }, + "mastercard-oauth1-signer": { + "libraryName": "mastercard-oauth1-signer", + "asOfVersion": "1.2.0" + }, "match-sorter": { "libraryName": "match-sorter", "asOfVersion": "6.0.0" diff --git a/types/mastercard-oauth1-signer/.npmignore b/types/mastercard-oauth1-signer/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/mastercard-oauth1-signer/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/mastercard-oauth1-signer/index.d.ts b/types/mastercard-oauth1-signer/index.d.ts deleted file mode 100644 index 675edc4fd29fba..00000000000000 --- a/types/mastercard-oauth1-signer/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// tslint:disable-next-line:no-unnecessary-class -declare class OAuth { - /** - * Creates a Mastercard API compliant OAuth Authorization header - */ - static getAuthorizationHeader( - uri: string, - method: string, - payload: string, - consumerKey: string, - signingKey: string, - ): string; -} - -export = OAuth; diff --git a/types/mastercard-oauth1-signer/mastercard-oauth1-signer-tests.ts b/types/mastercard-oauth1-signer/mastercard-oauth1-signer-tests.ts deleted file mode 100644 index 8b82011fd87f05..00000000000000 --- a/types/mastercard-oauth1-signer/mastercard-oauth1-signer-tests.ts +++ /dev/null @@ -1,4 +0,0 @@ -import OAuth = require("mastercard-oauth1-signer"); - -// $ExpectType string -OAuth.getAuthorizationHeader("https://example.com", "POST", "foo", "consumerKey", "signingKey"); diff --git a/types/mastercard-oauth1-signer/package.json b/types/mastercard-oauth1-signer/package.json deleted file mode 100644 index 9b44fe6b6dc7e8..00000000000000 --- a/types/mastercard-oauth1-signer/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "@types/mastercard-oauth1-signer", - "version": "1.1.9999", - "projects": [ - "https://github.com/Mastercard/oauth1-signer-nodejs#readme" - ], - "devDependencies": { - "@types/mastercard-oauth1-signer": "workspace:." - }, - "owners": [ - { - "name": "Dean Pienaar", - "githubUsername": "deanpienaar" - } - ] -} diff --git a/types/mastercard-oauth1-signer/tsconfig.json b/types/mastercard-oauth1-signer/tsconfig.json deleted file mode 100644 index 89a57b63ad9e67..00000000000000 --- a/types/mastercard-oauth1-signer/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "mastercard-oauth1-signer-tests.ts" - ] -} From 7a5b4baa1a67169e9b3c11d624bfeac2af78acc7 Mon Sep 17 00:00:00 2001 From: kwnt-dev Date: Fri, 3 Apr 2026 20:41:11 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74668=20[clipp?= =?UTF-8?q?er-lib]=20Add=20type=20definitions=20by=20@kwnt-dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/clipper-lib/.npmignore | 5 + types/clipper-lib/clipper-lib-tests.ts | 108 +++++++++++++++ types/clipper-lib/index.d.ts | 177 +++++++++++++++++++++++++ types/clipper-lib/package.json | 17 +++ types/clipper-lib/tsconfig.json | 19 +++ 5 files changed, 326 insertions(+) create mode 100644 types/clipper-lib/.npmignore create mode 100644 types/clipper-lib/clipper-lib-tests.ts create mode 100644 types/clipper-lib/index.d.ts create mode 100644 types/clipper-lib/package.json create mode 100644 types/clipper-lib/tsconfig.json diff --git a/types/clipper-lib/.npmignore b/types/clipper-lib/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/clipper-lib/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/clipper-lib/clipper-lib-tests.ts b/types/clipper-lib/clipper-lib-tests.ts new file mode 100644 index 00000000000000..cf8ab9620ed7f3 --- /dev/null +++ b/types/clipper-lib/clipper-lib-tests.ts @@ -0,0 +1,108 @@ +import * as ClipperLib from "clipper-lib"; + +// IntPoint +const pt: ClipperLib.IntPoint = { X: 10, Y: 20 }; +const ptZ: ClipperLib.IntPoint = { X: 10, Y: 20, Z: 5 }; + +// Path / Paths +const path: ClipperLib.Path = [ + { X: 0, Y: 0 }, + { X: 100, Y: 0 }, + { X: 100, Y: 100 }, + { X: 0, Y: 100 }, +]; +const paths: ClipperLib.Paths = [path]; + +// Enums +const ct: ClipperLib.ClipType = ClipperLib.ClipType.ctUnion; +const pt2: ClipperLib.PolyType = ClipperLib.PolyType.ptSubject; +const pft: ClipperLib.PolyFillType = ClipperLib.PolyFillType.pftEvenOdd; +const jt: ClipperLib.JoinType = ClipperLib.JoinType.jtRound; +const et: ClipperLib.EndType = ClipperLib.EndType.etClosedPolygon; + + +// Clipper - constructor +const cpr = new ClipperLib.Clipper(); +const cpr2 = new ClipperLib.Clipper( + ClipperLib.InitOptions.ioStrictlySimple | ClipperLib.InitOptions.ioPreserveCollinear, +); + +// Clipper - instance methods +cpr.AddPath(path, ClipperLib.PolyType.ptSubject, true); +cpr.AddPaths(paths, ClipperLib.PolyType.ptClip, true); +const solution: ClipperLib.Paths = []; +const success: boolean = cpr.Execute(ClipperLib.ClipType.ctIntersection, solution); +const bounds: ClipperLib.IntRect = cpr.GetBounds(); +cpr.Clear(); + +// Clipper - properties +cpr.PreserveCollinear = true; +cpr.ReverseSolution = false; +cpr.StrictlySimple = true; + +// Clipper - static methods +const area: number = ClipperLib.Clipper.Area(path); +const cleaned: ClipperLib.Path = ClipperLib.Clipper.CleanPolygon(path, 1.1); +const cleanedPaths: ClipperLib.Paths = ClipperLib.Clipper.CleanPolygons(paths, 1.1); +const orientation: boolean = ClipperLib.Clipper.Orientation(path); +const inPoly: number = ClipperLib.Clipper.PointInPolygon(pt, path); +ClipperLib.Clipper.ReversePath(path); +ClipperLib.Clipper.ReversePaths(paths); +const simplified: ClipperLib.Paths = ClipperLib.Clipper.SimplifyPolygon(path); +const simplifiedPaths: ClipperLib.Paths = ClipperLib.Clipper.SimplifyPolygons(paths); + +// Clipper - PolyTree +const polytree = new ClipperLib.PolyTree(); +cpr.AddPath(path, ClipperLib.PolyType.ptSubject, true); +cpr.Execute(ClipperLib.ClipType.ctUnion, polytree); +const closedPaths: ClipperLib.Paths = ClipperLib.Clipper.ClosedPathsFromPolyTree(polytree); +const openPaths: ClipperLib.Paths = ClipperLib.Clipper.OpenPathsFromPolyTree(polytree); +const allPaths: ClipperLib.Paths = ClipperLib.Clipper.PolyTreeToPaths(polytree); +const total: number = polytree.Total(); +const first: ClipperLib.PolyNode = polytree.GetFirst(); +polytree.Clear(); + +// PolyNode +const node = new ClipperLib.PolyNode(); +const childCount: number = node.ChildCount(); +const childs: ClipperLib.PolyNode[] = node.Childs(); +const contour: ClipperLib.Path = node.Contour(); +const next: ClipperLib.PolyNode = node.GetNext(); +const isHole: boolean = node.IsHole(); +const parent: ClipperLib.PolyNode = node.Parent(); +const isOpen: boolean = node.IsOpen; + +// Clipper - Minkowski +const minkDiff: ClipperLib.Paths = ClipperLib.Clipper.MinkowskiDiff(path, path); +const minkSum: ClipperLib.Paths = ClipperLib.Clipper.MinkowskiSum(path, path, true); + +// Clipper - deprecated OffsetPaths +const offsetted: ClipperLib.Paths = ClipperLib.Clipper.OffsetPaths(paths, 10); + +// ClipperOffset +const co = new ClipperLib.ClipperOffset(); +const co2 = new ClipperLib.ClipperOffset(2.0, 0.25); +co.AddPath(path, ClipperLib.JoinType.jtRound, ClipperLib.EndType.etClosedPolygon); +co.AddPaths(paths, ClipperLib.JoinType.jtSquare, ClipperLib.EndType.etClosedPolygon); +const offsetSolution: ClipperLib.Paths = []; +co.Execute(offsetSolution, 10); +co.ArcTolerance = 0.25; +co.MiterLimit = 2.0; +co.Clear(); + +// JS Helper functions +ClipperLib.JS.ScaleUpPath(path, 100); +ClipperLib.JS.ScaleUpPaths(paths, 100); +ClipperLib.JS.ScaleDownPath(path, 100); +ClipperLib.JS.ScaleDownPaths(paths, 100); +const areaOf: number = ClipperLib.JS.AreaOfPolygon(path); +const areasOf: number = ClipperLib.JS.AreaOfPolygons(paths); +const boundsPath: ClipperLib.IntRect = ClipperLib.JS.BoundsOfPath(path); +const boundsPaths: ClipperLib.IntRect = ClipperLib.JS.BoundsOfPaths(paths); +const cloned: ClipperLib.Paths = ClipperLib.JS.Clone(paths); +const cleanedJS: ClipperLib.Path = ClipperLib.JS.Clean(path, 1.0); +const lightened: ClipperLib.Path = ClipperLib.JS.Lighten(path, 1.0); +const perimPath: number = ClipperLib.JS.PerimeterOfPath(path, true); +const perimPaths: number = ClipperLib.JS.PerimeterOfPaths(paths, true); +const exPolys: ClipperLib.ExPolygons = ClipperLib.JS.PolyTreeToExPolygons(polytree); +const fromEx: ClipperLib.Paths = ClipperLib.JS.ExPolygonsToPaths(exPolys); diff --git a/types/clipper-lib/index.d.ts b/types/clipper-lib/index.d.ts new file mode 100644 index 00000000000000..76558c40f802bc --- /dev/null +++ b/types/clipper-lib/index.d.ts @@ -0,0 +1,177 @@ +export as namespace ClipperLib; + +// --- Preprocessor flags --- +export var use_int32: boolean; +export var use_xyz: boolean; +export var use_lines: boolean; +export var use_deprecated: boolean; + +// --- Types --- + +export interface IntPoint { + X: number; + Y: number; + Z?: number; +} + +export interface IntRect { + left: number; + top: number; + right: number; + bottom: number; +} + +export type Path = IntPoint[]; +export type Paths = Path[]; + +export interface ExPolygon { + outer: Path; + holes: Paths; +} + +export type ExPolygons = ExPolygon[]; + +// --- Enums --- + +export enum ClipType { + ctIntersection = 0, + ctUnion = 1, + ctDifference = 2, + ctXor = 3, +} + +export enum PolyType { + ptSubject = 0, + ptClip = 1, +} + +export enum PolyFillType { + pftEvenOdd = 0, + pftNonZero = 1, + pftPositive = 2, + pftNegative = 3, +} + +export enum JoinType { + jtSquare = 0, + jtRound = 1, + jtMiter = 2, +} + +export enum EndType { + etClosedPolygon = 0, + etClosedLine = 1, + etOpenButt = 2, + etOpenSquare = 3, + etOpenRound = 4, +} + +export enum EndType_ { + etSquare = 0, + etRound = 1, + etButt = 2, + etSingle = 3, +} + +export enum InitOptions { + ioReverseSolution = 1, + ioStrictlySimple = 2, + ioPreserveCollinear = 4, +} + +// --- PolyNode --- + +export class PolyNode { + IsOpen: boolean; + ChildCount(): number; + Childs(): PolyNode[]; + Contour(): Path; + GetNext(): PolyNode; + IsHole(): boolean; + Parent(): PolyNode; +} + +// --- PolyTree --- + +export class PolyTree extends PolyNode { + Clear(): void; + GetFirst(): PolyNode; + Total(): number; +} + +// --- Clipper --- + +export class Clipper { + constructor(initOptions?: number); + + PreserveCollinear: boolean; + ReverseSolution: boolean; + StrictlySimple: boolean; + ZFillFunction: + | ((bot1: IntPoint, top1: IntPoint, bot2: IntPoint, top2: IntPoint, pt: IntPoint) => void) + | null; + + AddPath(path: Path, polyType: PolyType, closed: boolean): boolean; + AddPaths(paths: Paths, polyType: PolyType, closed: boolean): boolean; + Clear(): void; + Execute(clipType: ClipType, solution: Paths, subjFillType?: PolyFillType, clipFillType?: PolyFillType): boolean; + Execute( + clipType: ClipType, + solution: PolyTree, + subjFillType?: PolyFillType, + clipFillType?: PolyFillType, + ): boolean; + GetBounds(): IntRect; + + static Area(poly: Path): number; + static CleanPolygon(path: Path, distance?: number): Path; + static CleanPolygons(polys: Paths, distance?: number): Paths; + static ClosedPathsFromPolyTree(polytree: PolyTree): Paths; + static MinkowskiDiff(poly1: Path, poly2: Path): Paths; + static MinkowskiSum(pattern: Path, path: Path, pathIsClosed: boolean): Paths; + static MinkowskiSum(pattern: Path, paths: Paths, pathIsClosed: boolean): Paths; + static OffsetPaths(polys: Paths, delta: number, joinType?: JoinType, endType?: EndType_, limit?: number): Paths; + static OpenPathsFromPolyTree(polytree: PolyTree): Paths; + static Orientation(poly: Path): boolean; + static PointInPolygon(pt: IntPoint, path: Path): number; + static PolyTreeToPaths(polytree: PolyTree): Paths; + static ReversePath(path: Path): void; + static ReversePaths(paths: Paths): void; + static SimplifyPolygon(poly: Path, fillType?: PolyFillType): Paths; + static SimplifyPolygons(polys: Paths, fillType?: PolyFillType): Paths; +} + +// --- ClipperOffset --- + +export class ClipperOffset { + constructor(miterLimit?: number, arcTolerance?: number); + + ArcTolerance: number; + MiterLimit: number; + + AddPath(path: Path, joinType: JoinType, endType: EndType): void; + AddPaths(paths: Paths, joinType: JoinType, endType: EndType): void; + Clear(): void; + Execute(solution: Paths, delta: number): void; + Execute(solution: PolyTree, delta: number): void; +} + +// --- JS Helper functions --- + +export namespace JS { + function AreaOfPolygon(poly: Path, scale?: number): number; + function AreaOfPolygons(polys: Paths, scale?: number): number; + function BoundsOfPath(path: Path): IntRect; + function BoundsOfPaths(paths: Paths): IntRect; + function Clone(paths: Paths): Paths; + function Clean(path: Path, delta: number): Path; + function Lighten(path: Path, tolerance: number): Path; + function PerimeterOfPath(path: Path, closed: boolean, scale?: number): number; + function PerimeterOfPaths(paths: Paths, closed: boolean, scale?: number): number; + function ScaleDownPath(path: Path, scale: number): void; + function ScaleDownPaths(paths: Paths, scale: number): void; + function ScaleUpPath(path: Path, scale: number): void; + function ScaleUpPaths(paths: Paths, scale: number): void; + function PolyTreeToExPolygons(polytree: PolyTree): ExPolygons; + function ExPolygonsToPaths(exPolygons: ExPolygons): Paths; +} diff --git a/types/clipper-lib/package.json b/types/clipper-lib/package.json new file mode 100644 index 00000000000000..353f369bfcedde --- /dev/null +++ b/types/clipper-lib/package.json @@ -0,0 +1,17 @@ +{ + "private": true, + "name": "@types/clipper-lib", + "version": "6.4.9999", + "projects": [ + "https://github.com/junmer/clipper-lib" + ], + "devDependencies": { + "@types/clipper-lib": "workspace:." + }, + "owners": [ + { + "name": "kwnt-dev", + "githubUsername": "kwnt-dev" + } + ] +} diff --git a/types/clipper-lib/tsconfig.json b/types/clipper-lib/tsconfig.json new file mode 100644 index 00000000000000..6f393c8e8364e2 --- /dev/null +++ b/types/clipper-lib/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clipper-lib-tests.ts" + ] +} From 55715dc70d577a9dfd8bcad9e45b48285fbe2946 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Fri, 3 Apr 2026 11:41:52 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=A4=96=20dprint=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/clipper-lib/clipper-lib-tests.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/clipper-lib/clipper-lib-tests.ts b/types/clipper-lib/clipper-lib-tests.ts index cf8ab9620ed7f3..3c3080788a6b2a 100644 --- a/types/clipper-lib/clipper-lib-tests.ts +++ b/types/clipper-lib/clipper-lib-tests.ts @@ -20,7 +20,6 @@ const pft: ClipperLib.PolyFillType = ClipperLib.PolyFillType.pftEvenOdd; const jt: ClipperLib.JoinType = ClipperLib.JoinType.jtRound; const et: ClipperLib.EndType = ClipperLib.EndType.etClosedPolygon; - // Clipper - constructor const cpr = new ClipperLib.Clipper(); const cpr2 = new ClipperLib.Clipper( From 90cba21ee8476e05d04e851a5fc31eb5fe23988f Mon Sep 17 00:00:00 2001 From: Jon Bishop <84878937+jbishop-cbs@users.noreply.github.com> Date: Fri, 3 Apr 2026 09:03:35 -0700 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74670=20[@type?= =?UTF-8?q?s/chromecast-caf-receiver]=20Revert=20const=20enum=20to=20enum?= =?UTF-8?q?=20by=20@jbishop-cbs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jon Bishop --- .../cast.framework.d.ts | 6 +- .../cast.framework.events.d.ts | 6 +- .../cast.framework.messages.d.ts | 64 +++++++++---------- .../cast.framework.system.d.ts | 16 ++--- .../cast.framework.ui.d.ts | 16 ++--- .../chromecast-caf-receiver-tests.ts | 21 ++++++ 6 files changed, 75 insertions(+), 54 deletions(-) diff --git a/types/chromecast-caf-receiver/cast.framework.d.ts b/types/chromecast-caf-receiver/cast.framework.d.ts index 80d0823f8aa39f..e1f6343bae5713 100644 --- a/types/chromecast-caf-receiver/cast.framework.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.d.ts @@ -11,7 +11,7 @@ export import system = system; export import messages = messages; export as namespace framework; -export const enum LoggerLevel { +export enum LoggerLevel { DEBUG = 0, VERBOSE = 500, INFO = 800, @@ -24,7 +24,7 @@ export const enum LoggerLevel { * Content protection type. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework#.ContentProtection */ -export const enum ContentProtection { +export enum ContentProtection { NONE = "none", CLEARKEY = "clearkey", PLAYREADY = "playready", @@ -997,7 +997,7 @@ export class NetworkRequestInfo { * * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework#.ShakaVariant */ -export const enum ShakaVariant { +export enum ShakaVariant { /** * The standard, default build. */ diff --git a/types/chromecast-caf-receiver/cast.framework.events.d.ts b/types/chromecast-caf-receiver/cast.framework.events.d.ts index 59da95ce50094d..b2560465b0100b 100644 --- a/types/chromecast-caf-receiver/cast.framework.events.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.events.d.ts @@ -17,7 +17,7 @@ export as namespace events; * Player event types for @see{@link framework.PlayerManager}. * https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.events#.EventType */ -export const enum EventType { +export enum EventType { ALL = "*", ABORT = "ABORT", CAN_PLAY = "CAN_PLAY", @@ -97,7 +97,7 @@ export const enum EventType { TRACKS_CHANGED = "TRACKS_CHANGED", } -export const enum DetailedErrorCode { +export enum DetailedErrorCode { MEDIA_UNKNOWN = 100, MEDIA_ABORTED = 101, MEDIA_DECODE = 102, @@ -144,7 +144,7 @@ export const enum DetailedErrorCode { * The error severity. Follows the same naming scheme and numbering as Shaka Player. * https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.events#.EventType */ -export const enum ErrorSeverity { +export enum ErrorSeverity { RECOVERABLE = 1, CRITICAL = 2, } diff --git a/types/chromecast-caf-receiver/cast.framework.messages.d.ts b/types/chromecast-caf-receiver/cast.framework.messages.d.ts index bd360fdc146f41..a2f045ec2aa7f0 100644 --- a/types/chromecast-caf-receiver/cast.framework.messages.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.messages.d.ts @@ -6,7 +6,7 @@ export as namespace messages; * Possible caption mimetype of text track. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.CaptionMimeType} */ -export const enum CaptionMimeType { +export enum CaptionMimeType { CEA608 = "text/cea608", TTML = "application/ttml+xml", TTML_MP4 = "application/mp4", @@ -17,7 +17,7 @@ export const enum CaptionMimeType { * Commands supported by {@link framework.messages.MediaStatus.supportedMediaCommands}. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.Command} */ -export const enum Command { +export enum Command { PAUSE = 1, SEEK = 2, STREAM_VOLUME = 4, @@ -43,7 +43,7 @@ export const enum Command { * Possible types of container metadata. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ContainerType} */ -export const enum ContainerType { +export enum ContainerType { GENERIC_CONTAINER = 0, AUDIOBOOK_CONTAINER = 1, } @@ -52,7 +52,7 @@ export const enum ContainerType { * Provides content filtering mode. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ContentFilteringMode} */ -export const enum ContentFilteringMode { +export enum ContentFilteringMode { FILTER_EXPLICIT = "FILTER_EXPLICIT", } @@ -60,7 +60,7 @@ export const enum ContentFilteringMode { * Represents media error message reasons. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ErrorReason} */ -export const enum ErrorReason { +export enum ErrorReason { APP_ERROR = "APP_ERROR", AUTHENTICATION_EXPIRED = "AUTHENTICATION_EXPIRED", CONCURRENT_STREAM_LIMIT = "CONCURRENT_STREAM_LIMIT", @@ -86,7 +86,7 @@ export const enum ErrorReason { * Represents media error message types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ErrorType} */ -export const enum ErrorType { +export enum ErrorType { ERROR = "ERROR", INVALID_PLAYER_STATE = "INVALID_PLAYER_STATE", INVALID_REQUEST = "INVALID_REQUEST", @@ -98,7 +98,7 @@ export const enum ErrorType { * Extended player state information. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ExtendedPlayerState} */ -export const enum ExtendedPlayerState { +export enum ExtendedPlayerState { LOADING = "LOADING", } @@ -106,7 +106,7 @@ export const enum ExtendedPlayerState { * Focus states. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.FocusState} */ -export const enum FocusState { +export enum FocusState { IN_FOCUS = "IN_FOCUS", NOT_IN_FOCUS = "NOT_IN_FOCUS", } @@ -115,7 +115,7 @@ export const enum FocusState { * The Get Status flag options determine the amount of data that must be included in the media status response. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.GetStatusOptions} */ -export const enum GetStatusOptions { +export enum GetStatusOptions { NO_METADATA = 1, NO_QUEUE_ITEMS = 2, } @@ -124,7 +124,7 @@ export const enum GetStatusOptions { * Represents video High Dynamic Range (HDR) types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.HdrType} */ -export const enum HdrType { +export enum HdrType { DV = "dv", HDR = "hdr", SDR = "sdr", @@ -134,7 +134,7 @@ export const enum HdrType { * Format of an HLS audio segment. * [Documentation]{@link https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.HlsSegmentFormat} */ -export const enum HlsSegmentFormat { +export enum HlsSegmentFormat { AAC = "aac", AC3 = "ac3", E_AC3 = "e_ac3", @@ -149,7 +149,7 @@ export const enum HlsSegmentFormat { * Format of an HLS audio segment. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.HlsSegmentFormat} */ -export const enum HlsVideoSegmentFormat { +export enum HlsVideoSegmentFormat { FMP4 = "fmp4", MPEG2_TS = "mpeg2_ts", } @@ -158,7 +158,7 @@ export const enum HlsVideoSegmentFormat { * The reason for the player to be in IDLE state. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.IdleReason} */ -export const enum IdleReason { +export enum IdleReason { CANCELLED = "CANCELLED", ERROR = "ERROR", FINISHED = "FINISHED", @@ -169,7 +169,7 @@ export const enum IdleReason { * The media category. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.MediaCategory} */ -export const enum MediaCategory { +export enum MediaCategory { AUDIO = "AUDIO", IMAGE = "IMAGE", VIDEO = "VIDEO", @@ -179,7 +179,7 @@ export const enum MediaCategory { * Represents media message types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.MessageType} */ -export const enum MessageType { +export enum MessageType { CLOUD_STATUS = "CLOUD_STATUS", CUSTOM_COMMAND = "CUSTOM_COMMAND", CUSTOM_STATE = "CUSTOM_STATE", @@ -230,7 +230,7 @@ export const enum MessageType { * Possible types of media metadata. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.MetadataType} */ -export const enum MetadataType { +export enum MetadataType { GENERIC = 0, MOVIE = 1, TV_SHOW = 2, @@ -243,7 +243,7 @@ export const enum MetadataType { * String IDs used by {@link framework.PlayerManager#playString} * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.PlayStringId */ -export const enum PlayStringId { +export enum PlayStringId { FREE_TRIAL_ABOUT_TO_EXPIRE = "FREE_TRIAL_ABOUT_TO_EXPIRE", PLAYING_ALTERNATE_MIX = "PLAYING_ALTERNATE_MIX", STREAM_HIJACKED = "STREAM_HIJACKED", @@ -254,7 +254,7 @@ export const enum PlayStringId { * Represents the player state. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.PlayerState} */ -export const enum PlayerState { +export enum PlayerState { BUFFERING = "BUFFERING", IDLE = "IDLE", PAUSED = "PAUSED", @@ -265,7 +265,7 @@ export const enum PlayerState { * Queue change types used by QUEUE_CHANGE outgoing message. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.QueueChangeType} */ -export const enum QueueChangeType { +export enum QueueChangeType { INSERT = "INSERT", ITEMS_CHANGE = "ITEMS_CHANGE", NO_CHANGE = "NO_CHANGE", @@ -277,7 +277,7 @@ export const enum QueueChangeType { * Types of media container/queue. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.QueueType} */ -export const enum QueueType { +export enum QueueType { ALBUM = "ALBUM", AUDIOBOOK = "AUDIOBOOK", LIVE_TV = "LIVE_TV", @@ -293,7 +293,7 @@ export const enum QueueType { * Behavior of the queue when all items have been played. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.RepeatMode} */ -export const enum RepeatMode { +export enum RepeatMode { REPEAT_ALL = "REPEAT_ALL", REPEAT_ALL_AND_SHUFFLE = "REPEAT_ALL_AND_SHUFFLE", REPEAT_OFF = "REPEAT_OFF", @@ -304,7 +304,7 @@ export const enum RepeatMode { * Represents the playback state after a SEEK request. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.SeekResumeState} */ -export const enum SeekResumeState { +export enum SeekResumeState { PLAYBACK_PAUSE = "PLAYBACK_PAUSE", PLAYBACK_START = "PLAYBACK_START", } @@ -313,7 +313,7 @@ export const enum SeekResumeState { * The streaming protocol types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.StreamingProtocolType} */ -export const enum StreamingProtocolType { +export enum StreamingProtocolType { UNKNOWN = 0, MPEG_DASH = 1, HLS = 2, @@ -324,7 +324,7 @@ export const enum StreamingProtocolType { * Represents the stream types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.StreamType} */ -export const enum StreamType { +export enum StreamType { BUFFERED = "BUFFERED", LIVE = "LIVE", NONE = "NONE", @@ -334,7 +334,7 @@ export const enum StreamType { * Possible text track edge type. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackEdgeType} */ -export const enum TextTrackEdgeType { +export enum TextTrackEdgeType { DEPRESSED = "DEPRESSED", DROP_SHADOW = "DROP_SHADOW", NONE = "NONE", @@ -346,7 +346,7 @@ export const enum TextTrackEdgeType { * Text track font generic family. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackFontGenericFamily} */ -export const enum TextTrackFontGenericFamily { +export enum TextTrackFontGenericFamily { CASUAL = "CASUAL", CURSIVE = "CURSIVE", MONOSPACED_SANS_SERIF = "MONOSPACED_SANS_SERIF", @@ -360,7 +360,7 @@ export const enum TextTrackFontGenericFamily { * Possible text track font style. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackFontStyle} */ -export const enum TextTrackFontStyle { +export enum TextTrackFontStyle { BOLD = "BOLD", BOLD_ITALIC = "BOLD_ITALIC", ITALIC = "ITALIC", @@ -371,7 +371,7 @@ export const enum TextTrackFontStyle { * Possible text track type (follows the HTML5 text track type definitions). * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackType} */ -export const enum TextTrackType { +export enum TextTrackType { CAPTIONS = "CAPTIONS", CHAPTERS = "CHAPTERS", DESCRIPTIONS = "DESCRIPTIONS", @@ -383,7 +383,7 @@ export const enum TextTrackType { * Text track window type. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackWindowType} */ -export const enum TextTrackWindowType { +export enum TextTrackWindowType { NONE = "NONE", NORMAL = "NORMAL", ROUNDED_CORNERS = "ROUNDED_CORNERS", @@ -393,7 +393,7 @@ export const enum TextTrackWindowType { * Possible media track type. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TrackType} */ -export const enum TrackType { +export enum TrackType { AUDIO = "AUDIO", TEXT = "TEXT", VIDEO = "VIDEO", @@ -403,7 +403,7 @@ export const enum TrackType { * User actions. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.UserAction} */ -export const enum UserAction { +export enum UserAction { DISLIKE = "DISLIKE", FLAG = "FLAG", FOLLOW = "FOLLOW", @@ -416,7 +416,7 @@ export const enum UserAction { * Context information for the user action. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.UserActionContext} */ -export const enum UserActionContext { +export enum UserActionContext { ALBUM = "ALBUM", ARTIST = "ARTIST", CHANNEL = "CHANNEL", diff --git a/types/chromecast-caf-receiver/cast.framework.system.d.ts b/types/chromecast-caf-receiver/cast.framework.system.d.ts index a9d45f8fdf032d..26cc0e65ea152e 100644 --- a/types/chromecast-caf-receiver/cast.framework.system.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.system.d.ts @@ -4,7 +4,7 @@ export as namespace system; * System events dispatched by {@link framework.CastReceiverContext}. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.EventType */ -export const enum EventType { +export enum EventType { ALLOW_GROUP_CHANGE = "allowgroupchange", /** * Fired when there is a system error. @@ -61,7 +61,7 @@ export const enum EventType { * Represents the current system state. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.SystemState */ -export const enum SystemState { +export enum SystemState { /** * The application has not been requested to start yet. */ @@ -92,7 +92,7 @@ export const enum SystemState { * Types of custom messages. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.MessageType */ -export const enum MessageType { +export enum MessageType { /** * Messages are free-form strings. The application is responsible for encoding/decoding the information transmitted. */ @@ -108,7 +108,7 @@ export const enum MessageType { * if the cast platform was unable to determine the state yet. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.StandbyState */ -export const enum StandbyState { +export enum StandbyState { NOT_STANDBY = "notstandby", STANDBY = "standby", UNKNOWN = "unknown", @@ -118,7 +118,7 @@ export const enum StandbyState { * Represents the disconnect reason. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.DisconnectReason */ -export const enum DisconnectReason { +export enum DisconnectReason { /** * There was a protocol error. */ @@ -141,7 +141,7 @@ export const enum DisconnectReason { * Represent where the receiver was launched from. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.LaunchedFrom */ -export const enum LaunchedFrom { +export enum LaunchedFrom { /** * App was launched by Cast V2 request. */ @@ -164,7 +164,7 @@ export const enum LaunchedFrom { * Device capabilities. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.DeviceCapabilities */ -export const enum DeviceCapabilities { +export enum DeviceCapabilities { APP_FOREGROUND = "app_foreground", /** * Audio Assistant support. For example, Google Home and Google Home Mini. @@ -218,7 +218,7 @@ export const enum DeviceCapabilities { * It may be UNKNOWN if the cast platform was unable to determine the state yet. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.VisibilityState */ -export const enum VisibilityState { +export enum VisibilityState { NOT_VISIBLE = "notvisible", UNKNOWN = "unknown", VISIBLE = "visible", diff --git a/types/chromecast-caf-receiver/cast.framework.ui.d.ts b/types/chromecast-caf-receiver/cast.framework.ui.d.ts index 9e8084796e0afd..dbb39af8746e50 100644 --- a/types/chromecast-caf-receiver/cast.framework.ui.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.ui.d.ts @@ -20,7 +20,7 @@ export type ContentType = "video" | "audio" | "image"; * UI state of receiver application. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.State */ -export const enum State { +export enum State { LAUNCHING = "launching", IDLE = "idle", LOADING = "loading", @@ -33,7 +33,7 @@ export const enum State { * Player data changed event types. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.PlayerDataEventType */ -export const enum PlayerDataEventType { +export enum PlayerDataEventType { ACTIVE_TRACK_IDS_CHANGED = "activeTrackIdsChanged", ANY_CHANGE = "*", APPLICATION_DATA_CHANGED = "applicationDataChanged", @@ -517,7 +517,7 @@ export class UiConfig { * Aspect ratio of all images in the media browse carousel. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.BrowseImageAspectRatio */ -export const enum BrowseImageAspectRatio { +export enum BrowseImageAspectRatio { /** * Square images. */ @@ -541,7 +541,7 @@ export const enum BrowseImageAspectRatio { * available for the browse item. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.BrowseImageType */ -export const enum BrowseImageType { +export enum BrowseImageType { /** * A playlist that consists of songs by a specific * music artist or band, or radio seeded by an artist @@ -627,7 +627,7 @@ export const enum BrowseImageType { * Badge that will be displayed on top of the browse item image. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.BrowseMediaBadge */ -export const enum BrowseMediaBadge { +export enum BrowseMediaBadge { /** * LIVE indicator badge. Should be used if stream is a live * content. @@ -639,7 +639,7 @@ export const enum BrowseMediaBadge { * Predefined buttons for the Media Controls overlay * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.ControlsButton */ -export const enum ControlsButton { +export enum ControlsButton { /** * Turn on/off closed captions. */ @@ -720,7 +720,7 @@ export const enum ControlsButton { * Touch Controls interface. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.ControlsSlot */ -export const enum ControlsSlot { +export enum ControlsSlot { /** * Side left slot. Deprecated, use SLOT_SECONDARY_1 instead. * @@ -774,7 +774,7 @@ export const enum ControlsSlot { * Device display type. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.DisplayType */ -export const enum DisplayType { +export enum DisplayType { TV = "tv", TOUCH = "touch", } diff --git a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts index 30846656f3a8ad..f0aa1c512cc495 100644 --- a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts +++ b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts @@ -1,3 +1,4 @@ +import { ContentProtection, LoggerLevel } from "chromecast-caf-receiver/cast.framework"; import { BreakManager } from "chromecast-caf-receiver/cast.framework.breaks"; import { DetailedErrorCode, EventType, MediaFinishedEvent } from "chromecast-caf-receiver/cast.framework.events"; import { @@ -9,6 +10,26 @@ import { TrackType, } from "chromecast-caf-receiver/cast.framework.messages"; import { ApplicationData, LaunchedFrom } from "chromecast-caf-receiver/cast.framework.system"; +import { ControlsButton, ControlsSlot, State } from "chromecast-caf-receiver/cast.framework.ui"; + +// Enums must remain non-const to avoid breaking projects that compile +// with isolatedModules: true (the compiler cannot inline const enum +// values from external .d.ts files). +// A regular enum produces a runtime object, so it can be assigned to a +// variable. A const enum does not, so the assignment below would fail +// at compile time -- making these lines a regression guard. +const _messageStreamType = StreamType; +const _messageMessageType = MessageType; +const _messageTrackType = TrackType; +const _messageHlsSegmentFormat = HlsSegmentFormat; +const _eventsEventType = EventType; +const _eventsDetailedErrorCode = DetailedErrorCode; +const _systemLaunchedFrom = LaunchedFrom; +const _frameworkContentProtection = ContentProtection; +const _frameworkLoggerLevel = LoggerLevel; +const _uiState = State; +const _uiControlsSlot = ControlsSlot; +const _uiControlsButton = ControlsButton; // The following test showcases how you can import individual types directly from the namespace: From a7251fc4f5a9f005b3c0b6e19dd931e90b0aa223 Mon Sep 17 00:00:00 2001 From: Sam Ramon <15154970+samantharamon@users.noreply.github.com> Date: Fri, 3 Apr 2026 09:27:29 -0700 Subject: [PATCH 5/5] [office-js][office-js-preview] (Outlook) Document default Smart Alerts message (#74831) --- types/office-js-preview/index.d.ts | 6 +++++- types/office-js/index.d.ts | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index c3cd3c95a407d1..b2d89728502106 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -25332,7 +25332,11 @@ declare namespace Office { * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * - * **Important**: The error message must be 500 characters or less. + * **Important**: + * + * - The error message must be 500 characters or less. + * + * - If you don't specify a message in the `errorMessage` property, the following default message is shown instead: "\ is preventing this email from being sent." */ errorMessage?: string; /** diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 999a61f0452805..8dbb72ad56135b 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -24575,7 +24575,11 @@ declare namespace Office { * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose * - * **Important**: The error message must be 500 characters or less. + * **Important**: + * + * - The error message must be 500 characters or less. + * + * - If you don't specify a message in the `errorMessage` property, the following default message is shown instead: "\ is preventing this email from being sent." */ errorMessage?: string; /**