Adding upstream version 0.0~git20250409.f7acab6.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b9b5d88025
commit
21b930d007
51 changed files with 11229 additions and 0 deletions
3
global-types/README.md
Normal file
3
global-types/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
## Core type definitions for goja_nodejs.
|
||||
|
||||
This package is used by other type definition packages for goja_nodejs. You probably do not need to install it directly.
|
16
global-types/globals.d.ts
vendored
Normal file
16
global-types/globals.d.ts
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
export {};
|
||||
|
||||
declare global {
|
||||
namespace GojaNodeJS {
|
||||
interface Iterator<T, TReturn = any, TNext = any> extends IteratorObject<T, TReturn, TNext> {
|
||||
[Symbol.iterator](): GojaNodeJS.Iterator<T, TReturn, TNext>;
|
||||
}
|
||||
|
||||
// Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators
|
||||
type BuiltinIteratorReturn = ReturnType<any[][typeof Symbol.iterator]> extends
|
||||
globalThis.Iterator<any, infer TReturn> ? TReturn
|
||||
: any;
|
||||
|
||||
}
|
||||
}
|
||||
|
16
global-types/package.json
Normal file
16
global-types/package.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "@dop251/types-goja_nodejs-global",
|
||||
"version": "0.0.1-rc2",
|
||||
"types": "globals.d.ts",
|
||||
"scripts": {
|
||||
"test": "tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "next"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dop251/goja_nodejs.git"
|
||||
},
|
||||
"private": false
|
||||
}
|
18
global-types/tsconfig.json
Normal file
18
global-types/tsconfig.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"files": ["globals.d.ts"],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "esnext",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue