From 6102b6a3835a84d237c11d7d1598e2b7d317bf4d Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Mon, 9 Mar 2026 08:24:57 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20Update=20CODEOWNERS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CODEOWNERS | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 67b425461f044d..d30c5ce8402af7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1504,7 +1504,6 @@ /types/digital-goods-browser/ @vantezzen /types/digital-link.js/ @eoin-obrien /types/digitalbazaar__bitstring/ @antonio-ivanovski -/types/dinero.js/ @BendingBender @juandaco @peterblazejewicz /types/dingtalk-robot-sender/ @bangbang93 /types/dir-glob/ @BendingBender /types/director/ @pastelmind @@ -1549,7 +1548,6 @@ /types/dogapi/ @olebedev /types/doge-seed/ @BendingBender /types/doi-regex/ @thewilkybarkid -/types/dojo/ @vansimke /types/dom-background-sync/ @brad4d @blickly @12wrigja /types/dom-chromium-ai/ @christianliebel @tomayac /types/dom-chromium-installation-events/ @dartess @@ -2147,7 +2145,7 @@ /types/flat-tree/ @martinheidegger /types/fleximap/ @DanielRose /types/flexslider/ @diullei @martin-badin -/types/flickity/ @clmcgrath @wagich @aheber @PabloDiablo @Dashiing @rdennis +/types/flickity/ @clmcgrath @wagich @aheber @PabloDiablo @rdennis /types/flightplan/ @borislavjivkov /types/flipsnap/ @kubosho @gsino @mayuki /types/float-equal/ @dmurvihill @@ -3211,6 +3209,7 @@ /types/hostile/ @AndrewLeedham /types/hot-formula-parser/ @joao-mbn /types/hotwired__turbo/ @G-Rath @lukeify @myabc +/types/hotwired__turbo-rails/ @myabc @G-Rath /types/howler/ @xperiments @alien35 @nicholashza @cjurango @MrGriefs /types/hoxy/ @TrueLecter /types/hpp/ @kryops @@ -4939,7 +4938,6 @@ /types/mongoose-auto-increment/ @AyaMorisawa /types/mongoose-deep-populate/ @AyaMorisawa /types/mongoose-delete/ @ndunks @alexbrazier -/types/mongoose-geojson-schema/ @bondz /types/mongoose-id-validator/ @kerolloz /types/mongoose-lean-id/ @yincrash /types/mongoose-lean-virtuals/ @isaacdecoded @@ -5232,7 +5230,7 @@ /types/node-ssdp/ @OrionNebula /types/node-ssha256/ @midgleyc /types/node-static/ @Morfent -/types/node-statsd/ @alexturek @convoyinc +/types/node-statsd/ @alexturek /types/node-steam-openid/ @joshuajeschek /types/node-summary/ @manuzcheruz /types/node-targz/ @junlarsen From 123a741ed743f9fc9fc459a64cae5067977237b0 Mon Sep 17 00:00:00 2001 From: Marc Emmanuel Date: Mon, 9 Mar 2026 11:21:22 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74654=20refact?= =?UTF-8?q?or:=20update=20lineclip=20types=20and=20tests=20for=20improved?= =?UTF-8?q?=20clarity=20and=20functionality=20by=20@SheepFromHeaven?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/lineclip/index.d.ts | 20 ++++++-------------- types/lineclip/lineclip-tests.ts | 28 ++++++++++++++++++++++++++-- types/lineclip/package.json | 7 ++++++- 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/types/lineclip/index.d.ts b/types/lineclip/index.d.ts index 6a0f68660677f6..a5852800759740 100644 --- a/types/lineclip/index.d.ts +++ b/types/lineclip/index.d.ts @@ -1,15 +1,7 @@ -declare namespace Lineclip { - type Point = [number, number]; - type BoundingBox = [number, number, number, number]; - type LineClipResult = Point[]; +export type Point = [number, number]; +export type BoundingBox = [number, number, number, number]; +export type LineClipResult = Point[][]; +export type PolygonClipResult = Point[]; - function polyline(points: Point[], bbox: BoundingBox, result?: LineClipResult[]): LineClipResult; - function polygon(points: Point[], bbox: BoundingBox): LineClipResult; -} - -declare function Lineclip( - points: Lineclip.Point[], - bbox: Lineclip.BoundingBox, - result?: Lineclip.LineClipResult[], -): Lineclip.LineClipResult; -export = Lineclip; +export function clipPolyline(points: Point[], bbox: BoundingBox, result?: LineClipResult): LineClipResult; +export function clipPolygon(points: Point[], bbox: BoundingBox): PolygonClipResult; diff --git a/types/lineclip/lineclip-tests.ts b/types/lineclip/lineclip-tests.ts index 44e7bb9340093f..2d2dfaa36a3bb0 100644 --- a/types/lineclip/lineclip-tests.ts +++ b/types/lineclip/lineclip-tests.ts @@ -1,4 +1,11 @@ -import { type BoundingBox, type Point, polyline } from "lineclip"; +import { + type BoundingBox, + clipPolygon, + clipPolyline, + type LineClipResult, + type Point, + type PolygonClipResult, +} from "lineclip"; const line: Point[] = [ [-10, 10], @@ -19,6 +26,23 @@ const line: Point[] = [ [-10, 20], ]; +const polygon: Point[] = [ + [-10, 10], + [0, 10], + [10, 10], + [10, 5], + [10, -5], + [10, -10], + [20, -10], + [-10, 10], +]; + const bbox: BoundingBox = [0, 0, 30, 30]; -polyline(line, bbox); +const result: LineClipResult = clipPolyline(line, bbox); +const withOptionalResult: LineClipResult = clipPolyline(line, bbox, [[[0, 1], [2, 3]]]); + +const polygonResult: PolygonClipResult = clipPolygon(polygon, bbox); + +const onePoint: Point = result[0][0]; +const onePolygonPoint: Point = polygonResult[0]; diff --git a/types/lineclip/package.json b/types/lineclip/package.json index b4a353ef02068c..b8fd23bd4052ee 100644 --- a/types/lineclip/package.json +++ b/types/lineclip/package.json @@ -1,7 +1,8 @@ { "private": true, "name": "@types/lineclip", - "version": "1.1.9999", + "version": "2.0.9999", + "type": "module", "projects": [ "https://github.com/mapbox/lineclip#readme" ], @@ -12,6 +13,10 @@ { "name": "Sikriti Dakua", "githubUsername": "devloop01" + }, + { + "name": "Marc Emmanuel", + "githubUsername": "SheepFromHeaven" } ] }