1
0
Fork 0

Adding upstream version 0.0~git20250409.f7acab6.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-22 11:36:18 +02:00
parent b9b5d88025
commit 21b930d007
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
51 changed files with 11229 additions and 0 deletions

3
global-types/README.md Normal file
View 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
View 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
View 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
}

View 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
}
}