Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d425e9c
🤖 Merge PR #74815 [google-apps-script-oauth2] Update types for versio…
sznorbert07 Apr 8, 2026
1e54343
🤖 Merge PR #74835 [spdx-expression-parse] Update to v4, add missing e…
JamieMagee Apr 8, 2026
aa1a634
🤖 Merge PR #74844 [npm-license-corrections] Add type definitions for …
JamieMagee Apr 8, 2026
825be07
🤖 Merge PR #74845 [spdx-expression-validate Add type definitions for …
JamieMagee Apr 8, 2026
aa1359f
🤖 Merge PR #74843 [spdx-id-to-url] Add type definitions for spdx-id-t…
JamieMagee Apr 8, 2026
b5d0c4c
🤖 Merge PR #74837 [spdx-exceptions] Add type definitions for spdx-exc…
JamieMagee Apr 8, 2026
04d84e0
🤖 Merge PR #74842 [spdx-is-osi] Add type definitions for spdx-is-osi …
JamieMagee Apr 8, 2026
ece903b
🤖 Merge PR #74841 [spdx-ranges] Add type definitions for spdx-ranges …
JamieMagee Apr 8, 2026
c42a3ff
🤖 Merge PR #74838 [spdx-to-html] Add type definitions for spdx-to-htm…
JamieMagee Apr 8, 2026
141bb4d
🤖 Merge PR #74839 [spdx-copyleft] Add type definitions for spdx-copyl…
JamieMagee Apr 8, 2026
e5fd33d
🤖 Merge PR #74836 [spdx-osi] Add type definitions for spdx-osi by @Ja…
JamieMagee Apr 8, 2026
44a71ee
🤖 Merge PR #74840 [correct-license-metadata] Add type definitions for…
JamieMagee Apr 8, 2026
c4936e9
🤖 Merge PR #74858 [licensee] Add type definitions for licensee by @Ja…
JamieMagee Apr 8, 2026
90dea4c
🤖 Merge PR #74859 [spdx-compare] Add type definitions for spdx-compar…
JamieMagee Apr 8, 2026
45a53d8
🤖 Merge PR #74860 [spdx-whitelisted] Add type definitions for spdx-wh…
JamieMagee Apr 8, 2026
2de9b74
🤖 dprint fmt
typescript-bot Apr 8, 2026
6d00261
🤖 Merge PR #74847 [chrome] update manifest keys by @erwanjugand
erwanjugand Apr 8, 2026
c799fca
🤖 Merge PR #74609 [jsbox-app]Add types for JSBox iOS App by @Gandum2077
Gandum2077 Apr 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 110 additions & 74 deletions types/chrome/index.d.ts

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions types/chrome/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,63 @@ function testGetManifest() {
manifest.author.email; // $ExpectType string
}

if (manifest.cross_origin_embedder_policy) {
manifest.cross_origin_embedder_policy.value; // $ExpectType string
}

if (manifest.cross_origin_opener_policy) {
manifest.cross_origin_opener_policy.value; // $ExpectType string
}

if (manifest.declarative_net_request?.rule_resources) {
manifest.declarative_net_request.rule_resources[0].id; // $ExpectType string
manifest.declarative_net_request.rule_resources[0].path; // $ExpectType string
manifest.declarative_net_request.rule_resources[0].enabled; // $ExpectType boolean
}

if (manifest.file_system_provider_capabilities) {
manifest.file_system_provider_capabilities.configurable; // $ExpectType boolean | undefined
manifest.file_system_provider_capabilities.watchable; // $ExpectType boolean | undefined
manifest.file_system_provider_capabilities.multiple_mounts; // $ExpectType boolean | undefined
manifest.file_system_provider_capabilities.source; // $ExpectType "file" | "device" | "network"
}

if (manifest.import) {
manifest.import[0].id; // $ExpectType string
manifest.import[0].minimum_version; // $ExpectType string | undefined
}

if (manifest.export) {
manifest.export.allowlist; // $ExpectType string[] | undefined
}

if (manifest.file_system_provider_capabilities) {
manifest.file_system_provider_capabilities.configurable; // $ExpectType boolean | undefined
manifest.file_system_provider_capabilities.watchable; // $ExpectType boolean | undefined
manifest.file_system_provider_capabilities.source; // $ExpectType "file" | "device" | "network"
}

manifest.incognito; // $ExpectType "spanning" | "split" | "not_allowed" | undefined

if (manifest.input_components) {
manifest.input_components[0].name; // $ExpectType string
manifest.input_components[0].id; // $ExpectType string | undefined
manifest.input_components[0].language; // $ExpectType string | string[] | undefined
manifest.input_components[0].layouts; // $ExpectType string | string[] | undefined
manifest.input_components[0].input_view; // $ExpectType string | undefined
manifest.input_components[0].options_page; // $ExpectType string | undefined
}

if (manifest.options_ui) {
manifest.options_ui.page; // $ExpectType string
manifest.options_ui.open_in_tab; // $ExpectType boolean
}

if (manifest.sandbox) {
manifest.sandbox.pages; // $ExpectType string[]
manifest.sandbox.content_security_policy; // $ExpectType string | undefined
}

if (manifest.manifest_version === 2) {
manifest.browser_action; // $ExpectType ManifestAction | undefined
manifest.page_action; // $ExpectType ManifestAction | undefined
Expand Down Expand Up @@ -1064,6 +1121,17 @@ function testGetManifest() {
manifest.optional_host_permissions; // $ExpectType string[] | undefined
manifest.permissions; // $ExpectType ManifestPermission[] | undefined

if (manifest.file_handlers) {
manifest.file_handlers[0].action; // $ExpectType string
manifest.file_handlers[0].name; // $ExpectType string
manifest.file_handlers[0].accept; // $ExpectType { [mime_type: string]: string[] }
manifest.file_handlers[0].launch_type; // $ExpectType "multiple-clients" | "single-client" | undefined
}

if (manifest.side_panel) {
manifest.side_panel.default_path; // $ExpectType string
}

manifest.web_accessible_resources = [{
resources: ["resource.js"],
use_dynamic_url: true,
Expand Down Expand Up @@ -1121,6 +1189,12 @@ function testGetManifest() {
16: "icon-16.png",
},
},
content_scripts: [
{
matches: ["https://github.com/*"],
js: ["cs.js"],
},
],
content_security_policy: "default-src 'self'",
optional_permissions: ["https://*/*"],
permissions: ["https://*/*"],
Expand Down
5 changes: 5 additions & 0 deletions types/correct-license-metadata/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!**/*.d.ts
!**/*.d.cts
!**/*.d.mts
!**/*.d.*.ts
16 changes: 16 additions & 0 deletions types/correct-license-metadata/correct-license-metadata-tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import correctLicenseMetadata = require("correct-license-metadata");

// $ExpectType string | false
correctLicenseMetadata({ license: "MIT" });

// $ExpectType string | false
correctLicenseMetadata({ licenses: [{ type: "MIT" }] });

// $ExpectType string | false
correctLicenseMetadata({ license: "Apache 2" });

// $ExpectType string | false
correctLicenseMetadata({ licenses: ["MIT"] });

// @ts-expect-error
correctLicenseMetadata("MIT");
14 changes: 14 additions & 0 deletions types/correct-license-metadata/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
declare function correctLicenseMetadata(metadata: correctLicenseMetadata.PackageMetadata): string | false;

declare namespace correctLicenseMetadata {
interface PackageMetadata {
license?: string | { type?: string; license?: string } | undefined;
licenses?:
| Array<string | { type?: string; license?: string }>
| string
| { type?: string; license?: string }
| undefined;
}
}

export = correctLicenseMetadata;
17 changes: 17 additions & 0 deletions types/correct-license-metadata/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"private": true,
"name": "@types/correct-license-metadata",
"version": "1.5.9999",
"projects": [
"https://github.com/jslicense/correct-license-metadata.js"
],
"devDependencies": {
"@types/correct-license-metadata": "workspace:."
},
"owners": [
{
"name": "Jamie Magee",
"githubUsername": "JamieMagee"
}
]
}
19 changes: 19 additions & 0 deletions types/correct-license-metadata/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "node16",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"correct-license-metadata-tests.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Examples from https://github.com/googlesamples/apps-script-oauth2
// Examples from https://github.com/googleworkspace/apps-script-oauth2

/**
* Create the OAuth2 service.
Expand All @@ -17,6 +17,73 @@ function getDriveService() {
.setParam("approval_prompt", "force");
}

/**
* Create sample service for Twitter.
*/
function getTwitterService() {
const userProps = PropertiesService.getUserProperties();
const clientId = "sampleClientId";
const clientSecret = "sampleClientSecret";

return OAuth2.createService("Twitter")
.setAuthorizationBaseUrl("https://twitter.com/i/oauth2/authorize")
.setTokenUrl("https://api.twitter.com/2/oauth2/token")
.setClientId(clientId)
.setClientSecret(clientSecret)
.setCallbackFunction("authCallback")
.setPropertyStore(userProps)
.setScope("users.read tweet.read offline.access")
.generateCodeVerifier()
.setTokenHeaders({
"Authorization": "Basic " + Utilities.base64Encode(clientId + ":" + clientSecret),
"Content-Type": "application/x-www-form-urlencoded",
});
}

/**
* Create sample service with custom token method.
*/
function getTestClientWithCustomTokenMethod() {
return OAuth2.createService("TestService")
.setAuthorizationBaseUrl("https://example.com/auth")
.setTokenUrl("https://example.com/token")
.setClientId("sampleClientId")
.setClientSecret("sampleClientSecret")
.setCallbackFunction("authCallback")
.setPropertyStore(PropertiesService.getUserProperties())
.setTokenMethod("PUT");
}

/**
* Create sample service with code verifier and S256 code challenge method.
*/
function getTestClientWithAutoCodeVerifierAndS256ChallengeMethod() {
return OAuth2.createService("TestService")
.setAuthorizationBaseUrl("https://example.com/auth")
.setTokenUrl("https://example.com/token")
.setClientId("sampleClientId")
.setClientSecret("sampleClientSecret")
.setCallbackFunction("authCallback")
.setPropertyStore(PropertiesService.getUserProperties())
.generateCodeVerifier()
.setCodeChallengeMethod(GoogleAppsScriptOAuth2.CodeChallengeMethod.S256);
}

/**
* Create sample service with code verifier and S256 code challenge method.
*/
function getTestClientWithManualCodeVerifierAndPlainChallengeMethod() {
return OAuth2.createService("TestService")
.setAuthorizationBaseUrl("https://example.com/auth")
.setTokenUrl("https://example.com/token")
.setClientId("sampleClientId")
.setClientSecret("sampleClientSecret")
.setCallbackFunction("authCallback")
.setPropertyStore(PropertiesService.getUserProperties())
.setCodeVerififer("sampleCodeVerifier")
.setCodeChallengeMethod(GoogleAppsScriptOAuth2.CodeChallengeMethod.PLAIN);
}

/**
* Handle the callback.
*/
Expand Down
32 changes: 32 additions & 0 deletions types/google-apps-script-oauth2/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ declare namespace GoogleAppsScriptOAuth2 {
* Often this URI needs to be entered into a configuration screen of your OAuth provider.
*/
getRedirectUri(scriptId?: string): string;
/**
* Gets the list of services with tokens stored in the given property store.
* This is useful if you connect to the same API with multiple accounts and
* need to keep track of them. If no stored tokens are found this will return
* an empty array.
*/
getServiceNames(propertyStore: GoogleAppsScript.Properties.PropertiesService): string[];
}

interface Storage {
Expand Down Expand Up @@ -217,6 +224,26 @@ declare namespace GoogleAppsScriptOAuth2 {
* For Google services this URL should be `https://accounts.google.com/o/oauth2/token`.
*/
setTokenUrl(tokenUrl: string): OAuth2Service;
/**
* Sets the HTTP method to use when retrieving or refreshing the access token.
* Default: `post`.
*/
setTokenMethod(tokenMethod: string): OAuth2Service;
/**
* Set the code verifier used for PKCE. For most use cases,
* prefer `generateCodeVerifier` to automatically initialize the
* value with a generated challenge string.
*/
setCodeVerififer(codeVerifier: string): OAuth2Service;
/**
* Sets the code verifier to a randomly generated challenge string.
*/
generateCodeVerifier(): OAuth2Service;
/**
* Set the code challenge method for PKCE. The default value method
* when a code verifier is set is `S256`.
*/
setCodeChallengeMethod(method: CodeChallengeMethod): OAuth2Service;
}

enum TokenFormat {
Expand All @@ -230,6 +257,11 @@ declare namespace GoogleAppsScriptOAuth2 {
FORM_URL_ENCODED = "application/x-www-form-urlencoded",
}

enum CodeChallengeMethod {
S256 = "S256",
PLAIN = "plain",
}

interface TokenPayload {
code: string;
client_id: string;
Expand Down
4 changes: 2 additions & 2 deletions types/google-apps-script-oauth2/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"private": true,
"name": "@types/google-apps-script-oauth2",
"version": "38.0.9999",
"version": "43.0.9999",
"nonNpm": true,
"nonNpmDescription": "google-apps-script-oauth2",
"projects": [
"https://github.com/googlesamples/apps-script-oauth2"
"https://github.com/googleworkspace/apps-script-oauth2"
],
"dependencies": {
"@types/google-apps-script": "*"
Expand Down
5 changes: 5 additions & 0 deletions types/jsbox-app/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!**/*.d.ts
!**/*.d.cts
!**/*.d.mts
!**/*.d.*.ts
50 changes: 50 additions & 0 deletions types/jsbox-app/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/// <reference path="./src/addin.d.ts" />
/// <reference path="./src/basic.d.ts" />
/// <reference path="./src/constant.d.ts" />
/// <reference path="./src/context.d.ts" />
/// <reference path="./src/drive.d.ts" />
/// <reference path="./src/file.d.ts" />
/// <reference path="./src/function.d.ts" />
/// <reference path="./src/input.d.ts" />
/// <reference path="./src/keyboard.d.ts" />
/// <reference path="./src/nodejs.d.ts" />
/// <reference path="./src/picker.d.ts" />
/// <reference path="./src/sqlite.d.ts" />
/// <reference path="./src/ssh.d.ts" />
/// <reference path="./src/ui.d.ts" />
/// <reference path="./src/widget.d.ts" />
/// <reference path="./src/extend/archiver.d.ts" />
/// <reference path="./src/extend/browser.d.ts" />
/// <reference path="./src/extend/detector.d.ts" />
/// <reference path="./src/extend/editor.d.ts" />
/// <reference path="./src/extend/push.d.ts" />
/// <reference path="./src/extend/qrcode.d.ts" />
/// <reference path="./src/extend/share.d.ts" />
/// <reference path="./src/extend/text.d.ts" />
/// <reference path="./src/extend/xml.d.ts" />
/// <reference path="./src/foundation/app.d.ts" />
/// <reference path="./src/foundation/cache.d.ts" />
/// <reference path="./src/foundation/clipboard.d.ts" />
/// <reference path="./src/foundation/device.d.ts" />
/// <reference path="./src/foundation/http.d.ts" />
/// <reference path="./src/foundation/keychain.d.ts" />
/// <reference path="./src/foundation/network.d.ts" />
/// <reference path="./src/foundation/prefs.d.ts" />
/// <reference path="./src/foundation/system.d.ts" />
/// <reference path="./src/foundation/thread.d.ts" />
/// <reference path="./src/foundation/timer.d.ts" />
/// <reference path="./src/media/audio.d.ts" />
/// <reference path="./src/media/imagekit.d.ts" />
/// <reference path="./src/media/pdf.d.ts" />
/// <reference path="./src/media/photo.d.ts" />
/// <reference path="./src/media/quicklook.d.ts" />
/// <reference path="./src/network/server.d.ts" />
/// <reference path="./src/network/socket.d.ts" />
/// <reference path="./src/sdk/calendar.d.ts" />
/// <reference path="./src/sdk/contact.d.ts" />
/// <reference path="./src/sdk/location.d.ts" />
/// <reference path="./src/sdk/message.d.ts" />
/// <reference path="./src/sdk/motion.d.ts" />
/// <reference path="./src/sdk/reminder.d.ts" />
/// <reference path="./src/sdk/safari.d.ts" />
/// <reference path="./src/shortcuts/intents.d.ts" />
Loading