diff --git a/types/electron-to-chromium/.npmignore b/types/electron-to-chromium/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/electron-to-chromium/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/electron-to-chromium/chromium-versions.d.ts b/types/electron-to-chromium/chromium-versions.d.ts new file mode 100644 index 00000000000000..99ceded6b5f82b --- /dev/null +++ b/types/electron-to-chromium/chromium-versions.d.ts @@ -0,0 +1,2 @@ +declare const _default: Record; +export = _default; diff --git a/types/electron-to-chromium/electron-to-chromium-tests.ts b/types/electron-to-chromium/electron-to-chromium-tests.ts new file mode 100644 index 00000000000000..159d77bb6ec6f4 --- /dev/null +++ b/types/electron-to-chromium/electron-to-chromium-tests.ts @@ -0,0 +1,18 @@ +import e2c = require("electron-to-chromium"); + +e2c.versions; +e2c.fullVersions; +e2c.chromiumVersions; +e2c.fullChromiumVersions; + +e2c.electronToChromium("123"); +e2c.electronToChromium(123); +e2c.chromiumToElectron("123"); +e2c.chromiumToElectron(123); +e2c.electronToBrowserList("123"); +e2c.electronToBrowserList(123); + +import _versions = require("electron-to-chromium/versions"); +import _fullVersions = require("electron-to-chromium/full-versions"); +import _chromiumVersions = require("electron-to-chromium/chromium-versions"); +import _fullChromiumVersions = require("electron-to-chromium/full-chromium-versions"); diff --git a/types/electron-to-chromium/full-chromium-versions.d.ts b/types/electron-to-chromium/full-chromium-versions.d.ts new file mode 100644 index 00000000000000..99ceded6b5f82b --- /dev/null +++ b/types/electron-to-chromium/full-chromium-versions.d.ts @@ -0,0 +1,2 @@ +declare const _default: Record; +export = _default; diff --git a/types/electron-to-chromium/full-versions.d.ts b/types/electron-to-chromium/full-versions.d.ts new file mode 100644 index 00000000000000..99ceded6b5f82b --- /dev/null +++ b/types/electron-to-chromium/full-versions.d.ts @@ -0,0 +1,2 @@ +declare const _default: Record; +export = _default; diff --git a/types/electron-to-chromium/index.d.ts b/types/electron-to-chromium/index.d.ts new file mode 100644 index 00000000000000..c3c5814e2a1398 --- /dev/null +++ b/types/electron-to-chromium/index.d.ts @@ -0,0 +1,46 @@ +/** + * An object of key-value pairs with a major Electron version as the key, + * and the corresponding major Chromium version as the value. + */ +export const versions: typeof import("./versions"); +/** + * An object of key-value pairs with a Electron version as the key, + * and the corresponding full Chromium version as the value. + */ +export const fullVersions: typeof import("./full-versions"); +/** + * An object of key-value pairs with a major Chromium version as the key, + * and the corresponding major Electron version as the value. + */ +export const chromiumVersions: typeof import("./chromium-versions"); +/** + * An object of key-value pairs with a Chromium version as the key, + * and an array of the corresponding major Electron versions as the value. + */ +export const fullChromiumVersions: typeof import("./full-chromium-versions"); + +/** + * A function that returns the corresponding Chromium version for a given Electron function. + * If you provide it with a major Electron version, it will return a major Chromium version. + * If you provide it with a full Electron version, it will return the full Chromium version. + * If a query does not match a Chromium version, it will return `undefined`. + */ +export function electronToChromium(query: string | number): string | undefined; + +/** + * Returns a string with the corresponding Electron version for a given Chromium query. + * If you provide it with a major Chromium version, it will return a major Electron version. + * If you provide it with a full Chrome version, it will return an array of full Electron versions. + * If a query does not match an Electron version, it will return `undefined`. + */ +export function chromiumToElectron(query: string | number): string | undefined; + +/** + * @deprecated + * A function that returns a {@link https://github.com/browserslist/browserslist Browserslist} query + * that matches the given major Electron version. + * If you provide it with a major Electron version, + * it will return a Browserlist query string that matches the Chromium capabilities. + * If a query does not match a Chromium version, it will return `undefined`. + */ +export function electronToBrowserList(query: string | number): string | undefined; diff --git a/types/electron-to-chromium/package.json b/types/electron-to-chromium/package.json new file mode 100644 index 00000000000000..9c8b3d0bfcccd6 --- /dev/null +++ b/types/electron-to-chromium/package.json @@ -0,0 +1,17 @@ +{ + "private": true, + "name": "@types/electron-to-chromium", + "version": "1.5.9999", + "projects": [ + "https://github.com/kilian/electron-to-chromium#readme" + ], + "devDependencies": { + "@types/electron-to-chromium": "workspace:." + }, + "owners": [ + { + "name": "Adam Thompson-Sharpe", + "githubUsername": "MysteryBlokHed" + } + ] +} diff --git a/types/electron-to-chromium/tsconfig.json b/types/electron-to-chromium/tsconfig.json new file mode 100644 index 00000000000000..2a93eb787e7b85 --- /dev/null +++ b/types/electron-to-chromium/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "node16", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "electron-to-chromium-tests.ts" + ] +} diff --git a/types/electron-to-chromium/versions.d.ts b/types/electron-to-chromium/versions.d.ts new file mode 100644 index 00000000000000..99ceded6b5f82b --- /dev/null +++ b/types/electron-to-chromium/versions.d.ts @@ -0,0 +1,2 @@ +declare const _default: Record; +export = _default; diff --git a/types/facebook-nodejs-business-sdk/src/exceptions.d.ts b/types/facebook-nodejs-business-sdk/src/exceptions.d.ts index 82609300c336e7..06d24a136e128c 100644 --- a/types/facebook-nodejs-business-sdk/src/exceptions.d.ts +++ b/types/facebook-nodejs-business-sdk/src/exceptions.d.ts @@ -13,5 +13,20 @@ export declare class FacebookRequestError extends FacebookError { * @param {Object} data */ constructor(response: any, method: any, url: any, data: any); + + name: string; + message: string; + stack: string; + status: number; + response: { + message: string; + type: string; + code: number; + fbtrace_id: string; + } + headers: { [key: string]: string }; + method: string; + url: string; + data: { data: object[], id: string }; } -export {}; +export { }; diff --git a/types/is-fqdn/.npmignore b/types/is-fqdn/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/is-fqdn/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/is-fqdn/index.d.ts b/types/is-fqdn/index.d.ts new file mode 100644 index 00000000000000..39e6873a693d9b --- /dev/null +++ b/types/is-fqdn/index.d.ts @@ -0,0 +1,20 @@ +declare namespace isFQDN { + interface Options { + /** + * @default true + */ + requireTld?: boolean | undefined; + /** + * @default false + */ + allowUnderscores?: boolean | undefined; + /** + * @default false + */ + allowTrailingDot?: boolean | undefined; + } +} + +declare function isFQDN(str: string, options?: isFQDN.Options): boolean; + +export = isFQDN; diff --git a/types/is-fqdn/is-fqdn-tests.ts b/types/is-fqdn/is-fqdn-tests.ts new file mode 100644 index 00000000000000..4670e88e2138d4 --- /dev/null +++ b/types/is-fqdn/is-fqdn-tests.ts @@ -0,0 +1,15 @@ +import isFQDN = require("is-fqdn"); + +// @ts-expect-error No arguments +isFQDN(); + +// $ExpectType boolean +isFQDN("foo"); +// $ExpectType boolean +isFQDN("foo", {}); +// $ExpectType boolean +isFQDN("foo", { + requireTld: true, + allowUnderscores: true, + allowTrailingDot: true, +}); diff --git a/types/is-fqdn/package.json b/types/is-fqdn/package.json new file mode 100644 index 00000000000000..d6599b4ca5bca8 --- /dev/null +++ b/types/is-fqdn/package.json @@ -0,0 +1,17 @@ +{ + "private": true, + "name": "@types/is-fqdn", + "version": "2.0.9999", + "projects": [ + "https://github.com/parro-it/is-fqdn#readme" + ], + "devDependencies": { + "@types/is-fqdn": "workspace:." + }, + "owners": [ + { + "name": "Adam Thompson-Sharpe", + "githubUsername": "MysteryBlokHed" + } + ] +} diff --git a/types/is-fqdn/tsconfig.json b/types/is-fqdn/tsconfig.json new file mode 100644 index 00000000000000..7584e0b462d9dc --- /dev/null +++ b/types/is-fqdn/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "node16", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-fqdn-tests.ts" + ] +}