diff --git a/notNeededPackages.json b/notNeededPackages.json index 73b8c25afe9fa0..1e0e81708f3c73 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2897,6 +2897,10 @@ "libraryName": "hashids", "asOfVersion": "2.0.0" }, + "hashmap": { + "libraryName": "hashmap", + "asOfVersion": "3.0.1" + }, "hcaptcha__react-hcaptcha": { "libraryName": "@hcaptcha/react-hcaptcha", "asOfVersion": "0.3.7" @@ -2993,6 +2997,10 @@ "libraryName": "htmlparser2", "asOfVersion": "4.1.0" }, + "http-codes": { + "libraryName": "http-codes", + "asOfVersion": "2.0.0" + }, "http-graceful-shutdown": { "libraryName": "http-graceful-shutdown", "asOfVersion": "2.3.0" diff --git a/types/d3-graphviz/d3-graphviz-tests.ts b/types/d3-graphviz/d3-graphviz-tests.ts index 73a3a0bd618136..0fa6adb112190a 100644 --- a/types/d3-graphviz/d3-graphviz-tests.ts +++ b/types/d3-graphviz/d3-graphviz-tests.ts @@ -15,5 +15,8 @@ const options: d3Graphviz.GraphvizOptions = d3Graphviz.graphviz("").options(); // Can set the options graphviz = graphviz.options(options); +// Can destroy +graphviz.destroy(); + // Can use selectWithoutDataPropagation const selected = select("this").selectWithoutDataPropagation("that"); diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 19e60d7a33d99f..967b637552b057 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -402,6 +402,12 @@ export interface Graphviz = new HashMap(); -const filledMap: HashMap = new HashMap("bar", 123, "bar2", 234); -const filledMap2: HashMap = new HashMap([ - ["bar", 123], - ["bar2", 234], -]); -const copiedMap: HashMap = new HashMap(filledMap); - -emptyMap.set("foo", 123); -emptyMap.set("foo", 123).set("foo2", 234); -emptyMap.multi("foo3", 345, "foo4", 456).multi("foo5", 567, "foo6", "678"); -emptyMap.copy(filledMap).copy(copiedMap); - -const value: number = emptyMap.get("foo") as number; -const missingValue: undefined = emptyMap.get("bar") as undefined; - -const hasFoo: boolean = emptyMap.has("foo"); - -const key: string = emptyMap.search(567); - -emptyMap.remove("foo").remove("foo2"); -emptyMap.delete("foo3").delete("foo4"); - -const keys: string[] = emptyMap.keys(); - -const values: number[] = emptyMap.values(); - -const entries: Array<[string, number]> = emptyMap.entries(); - -const count: number = emptyMap.count(); - -const clonedMap: HashMap = emptyMap.clone(); - -emptyMap - .forEach((value: number, key: string): void => { - console.log(key); - console.log(value); - }) - .forEach((value: number, key: string): void => { - console.log("Chained"); - console.log(key); - console.log(value); - }); - -emptyMap.clear().set("foo", 123); diff --git a/types/hashmap/index.d.ts b/types/hashmap/index.d.ts deleted file mode 100644 index c69904c101a8b3..00000000000000 --- a/types/hashmap/index.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -declare class HashMap { - /** - * Creates an empty hashmap. - */ - constructor(); - - /** - * Creates a hashmap with the key-value pairs of map or from an array of key-values. - * - * @param data A hashmap to copy from or a set or key-value pairs for the initialization. - */ - constructor(data: HashMap | Array<[TKey, TValue]>); - - /** - * Creates a hashmap with several key-value pairs. - * - * @param keysAndValues key1, value1, key2, value2... - */ - constructor(...keysAndValues: Array<(TKey | TValue)>); - - /** - * Return value from hashmap. - * - * @param key Key. - * @return Value stored under given key. If no value is stored for the key, returns undefined. - */ - get(key: TKey): TValue | undefined; - - /** - * Store value in hashmap. - * - * @param key Key. - * @param value Value. - * @return Self. - */ - set(key: TKey, value: TValue): HashMap; - - /** - * Store several key-value pairs. - * - * @param keysAndValues key1, value1, key2, value2... - * @return Self. - */ - multi(...keysAndValues: Array): HashMap; - - /** - * Copy all key-value pairs from other to this instance. - * - * @param map Other map. - * @return Self. - */ - copy(map: HashMap): HashMap; - - /** - * Checks if given key exists in hashmap. - * - * @param key Key. - * @return Whether given key exists in hashmap. - */ - has(key: TKey): boolean; - - /** - * Returns key under which given value is stored. - * - * @param value Value. - * @return Key which is assigned to value stored. - */ - search(value: TValue): TKey; - - /** - * Removes given key from hashmap. - * - * @param key Key. - * @return Self. - */ - delete(key: TKey): HashMap; - - /** - * Removes given key from hashmap. - * - * @param key Key. - * @return Self. - * @deprecated Since 2.3.0 - */ - remove(key: TKey): HashMap; - - /** - * Returns all contained keys. - * - * @return List of keys. - */ - keys(): TKey[]; - - /** - * Returns all container values. - * - * @return List of values. - */ - values(): TValue[]; - - /** - * Returns all key-value pairs. - * - * @return List of key-value pairs. - * @since 2.3.0 - */ - entries(): Array<[TKey, TValue]>; - - /** - * Returns size of hashmap (number of entries). - * - * @return Number of entries in hashmap. - */ - count(): number; - - /** - * Clears hashmap. - * - * @return Self. - */ - clear(): HashMap; - - /** - * Creates a new hashmap with all the key-value pairs of the original - * - * @return New hashmap. - */ - clone(): HashMap; - - /** - * Iterates over hashmap. - * - * @param callback Function to be invoked for every hashmap entry. - * @return Self. - */ - forEach(callback: (value: TValue, key: TKey) => void): HashMap; -} - -export = HashMap; -export as namespace HashMap; diff --git a/types/hashmap/package.json b/types/hashmap/package.json deleted file mode 100644 index 3bf27b8138c851..00000000000000 --- a/types/hashmap/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "private": true, - "name": "@types/hashmap", - "version": "2.3.9999", - "projects": [ - "https://github.com/flesler/hashmap" - ], - "devDependencies": { - "@types/hashmap": "workspace:." - }, - "owners": [ - { - "name": "Rafał Wrzeszcz", - "githubUsername": "rafalwrzeszcz" - }, - { - "name": "Vasya Aksyonov", - "githubUsername": "outring" - }, - { - "name": "Edoardo Morandi", - "githubUsername": "dodomorandi" - } - ] -} diff --git a/types/hashmap/tsconfig.json b/types/hashmap/tsconfig.json deleted file mode 100644 index fab0e0906cf9e4..00000000000000 --- a/types/hashmap/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "files": [ - "index.d.ts", - "hashmap-tests.ts" - ], - "compilerOptions": { - "module": "node16", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} diff --git a/types/hashmap/v1/.npmignore b/types/hashmap/v1/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/hashmap/v1/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/hashmap/v1/hashmap-tests.ts b/types/hashmap/v1/hashmap-tests.ts deleted file mode 100644 index 7f8ba7653b592d..00000000000000 --- a/types/hashmap/v1/hashmap-tests.ts +++ /dev/null @@ -1,22 +0,0 @@ -var map: HashMap = new HashMap(); - -map.set("foo", 123); - -var value: number = map.get("foo"); - -map.has("foo"); - -map.remove("foo"); - -var keys: string[] = map.keys(); - -var values: number[] = map.values(); - -var count: number = map.count(); - -map.forEach(function(value: number, key: string): void { - console.log(key); - console.log(value); -}); - -map.clear(); diff --git a/types/hashmap/v1/index.d.ts b/types/hashmap/v1/index.d.ts deleted file mode 100644 index 3bbff3ad9d44be..00000000000000 --- a/types/hashmap/v1/index.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -declare class HashMap { - /** - * Return value from hashmap. - * - * @param key Key. - * @return Value stored under given key. - */ - get(key: KeyType): ValueType; - - /** - * Store value in hashmap. - * - * @param key Key. - * @param value Value. - */ - set(key: KeyType, value: ValueType): void; - - /** - * Checks if given key exists in hashmap. - * - * @param key Key. - * @return Whether given key exists in hashmap. - */ - has(key: KeyType): boolean; - - /** - * Removes given key from hashmap. - * - * @param key Key. - */ - remove(key: KeyType): void; - - /** - * Returns all contained keys. - * - * @return List of keys. - */ - keys(): KeyType[]; - - /** - * Returns all container values. - * - * @return List of values. - */ - values(): ValueType[]; - - /** - * Returns size of hashmap (number of entries). - * - * @return Number of entries in hashmap. - */ - count(): number; - - /** - * Clears hashmap. - */ - clear(): void; - - /** - * Iterates over hashmap. - * - * @param callback Function to be invoked for every hashmap entry. - */ - forEach(callback: (value: ValueType, key: KeyType) => void): void; -} diff --git a/types/hashmap/v1/package.json b/types/hashmap/v1/package.json deleted file mode 100644 index 9605817bbc72b2..00000000000000 --- a/types/hashmap/v1/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "@types/hashmap", - "version": "1.1.9999", - "projects": [ - "https://github.com/flesler/hashmap" - ], - "devDependencies": { - "@types/hashmap": "workspace:." - }, - "owners": [ - { - "name": "Rafał Wrzeszcz", - "url": "http://wrzasq.pl" - } - ] -} diff --git a/types/hashmap/v1/tsconfig.json b/types/hashmap/v1/tsconfig.json deleted file mode 100644 index 32e2f3f3ce15d0..00000000000000 --- a/types/hashmap/v1/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "hashmap-tests.ts" - ] -} diff --git a/types/http-codes/.npmignore b/types/http-codes/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/http-codes/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/http-codes/http-codes-tests.ts b/types/http-codes/http-codes-tests.ts deleted file mode 100644 index 1e82c77b5bdc4e..00000000000000 --- a/types/http-codes/http-codes-tests.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { TOO_EARLY } from "http-codes"; - -const _tooEarly = TOO_EARLY; // $ExpectType number -_tooEarly + 5; diff --git a/types/http-codes/index.d.ts b/types/http-codes/index.d.ts deleted file mode 100644 index 175b299b9bb23b..00000000000000 --- a/types/http-codes/index.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -export const ACCEPTED: number; -export const ALREADY_REPORTED: number; -export const BAD_GATEWAY: number; -export const BAD_REQUEST: number; -export const BANDWIDTH_LIMIT_EXCEEDED: number; -export const CONFLICT: number; -export const CONTINUE: number; -export const CREATED: number; -export const EXPECTATION_FAILED: number; -export const FAILED_DEPENDENCY: number; -export const FORBIDDEN: number; -export const FOUND: number; -export const GATEWAY_TIMEOUT: number; -export const GONE: number; -export const HTTP_VERSION_NOT_SUPPORTED: number; -export const IM_A_TEAPOT: number; -export const IM_USED: number; -export const INSUFFICIENT_STORAGE: number; -export const INTERNAL_SERVER_ERROR: number; -export const LENGTH_REQUIRED: number; -export const LOCKED: number; -export const LOOP_DETECTED: number; -export const METHOD_NOT_ALLOWED: number; -export const MISDIRECTED_REQUEST: number; -export const MOVED_PERMANENTLY: number; -export const MULTIPLE_CHOICES: number; -export const MULTI_STATUS: number; -export const NETWORK_AUTHENTICATION_REQUIRED: number; -export const NON_AUTHORITATIVE_INFORMATION: number; -export const NOT_ACCEPTABLE: number; -export const NOT_EXTENDED: number; -export const NOT_FOUND: number; -export const NOT_IMPLEMENTED: number; -export const NOT_MODIFIED: number; -export const NO_CONTENT: number; -export const OK: number; -export const PARTIAL_CONTENT: number; -export const PAYLOAD_TOO_LARGE: number; -export const PAYMENT_REQUIRED: number; -export const PERMANENT_REDIRECT: number; -export const PRECONDITION_FAILED: number; -export const PRECONDITION_REQUIRED: number; -export const PROCESSING: number; -export const PROXY_AUTHENTICATION_REQUIRED: number; -export const RANGE_NOT_SATISFIABLE: number; -export const REQUEST_HEADER_FIELDS_TOO_LARGE: number; -export const REQUEST_TIMEOUT: number; -export const RESET_CONTENT: number; -export const SEE_OTHER: number; -export const SERVICE_UNAVAILABLE: number; -export const SWITCHING_PROTOCOLS: number; -export const TEMPORARY_REDIRECT: number; -export const TOO_MANY_REQUESTS: number; -export const UNAUTHORIZED: number; -export const UNAVAILABLE_FOR_LEGAL_REASONS: number; -export const TOO_EARLY: number; -export const UNPROCESSABLE_ENTITY: number; -export const UNSUPPORTED_MEDIA_TYPE: number; -export const UPGRADE_REQUIRED: number; -export const URI_TOO_LONG: number; -export const USE_PROXY: number; -export const VARIANT_ALSO_NEGOTIATES: number; diff --git a/types/http-codes/package.json b/types/http-codes/package.json deleted file mode 100644 index 82db2c9a3a182c..00000000000000 --- a/types/http-codes/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "@types/http-codes", - "version": "1.0.9999", - "projects": [ - "https://github.com/flesler/node-http-codes" - ], - "devDependencies": { - "@types/http-codes": "workspace:." - }, - "owners": [ - { - "name": "Mohamed Hegazy", - "githubUsername": "mhegazy" - } - ] -} diff --git a/types/http-codes/tsconfig.json b/types/http-codes/tsconfig.json deleted file mode 100644 index 6aee43c88c3f2b..00000000000000 --- a/types/http-codes/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "http-codes-tests.ts" - ] -} diff --git a/types/mapbox__mapbox-gl-geocoder/index.d.ts b/types/mapbox__mapbox-gl-geocoder/index.d.ts index 05f34b2f14f0df..36ee6cb1bed9db 100644 --- a/types/mapbox__mapbox-gl-geocoder/index.d.ts +++ b/types/mapbox__mapbox-gl-geocoder/index.d.ts @@ -154,7 +154,7 @@ declare namespace MapboxGeocoder { * Requires that `options.mapboxgl` also be set. * @default true */ - marker?: boolean | mapboxgl.Marker | undefined; + marker?: boolean | mapboxgl.Marker | mapboxgl.MarkerOptions | undefined; /** * A function that specifies how the results should be rendered in the dropdown menu. * This function should accepts a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) diff --git a/types/mapbox__mapbox-gl-geocoder/mapbox__mapbox-gl-geocoder-tests.ts b/types/mapbox__mapbox-gl-geocoder/mapbox__mapbox-gl-geocoder-tests.ts index 6d027b16b01616..d3e392494b97d7 100644 --- a/types/mapbox__mapbox-gl-geocoder/mapbox__mapbox-gl-geocoder-tests.ts +++ b/types/mapbox__mapbox-gl-geocoder/mapbox__mapbox-gl-geocoder-tests.ts @@ -158,3 +158,9 @@ geocoder.addTo(mapDiv); // $ExpectType MapboxGeocoder geocoder.addTo("#map"); + +// marker as MarkerOptions +const geocoderWithMarkerOpts = new MapboxGeocoder({ + accessToken: "token", + marker: { color: "#ff0000" }, +});