mirror of https://github.com/pyodide/pyodide.git
Hide accidentally included stuff from the documentation (#5274)
This commit is contained in:
parent
0c40393dee
commit
31cdf23b16
|
@ -32,6 +32,14 @@ DATA = {
|
|||
"TextDecoder": "$global/",
|
||||
"DataView": "$global/",
|
||||
"Uint8Array": "$global/",
|
||||
"Int8Array": "$global/",
|
||||
"Uint16Array": "$global/",
|
||||
"Int16Array": "$global/",
|
||||
"Uint32Array": "$global/",
|
||||
"Int32Array": "$global/",
|
||||
"Uint8ClampedArray": "$global/",
|
||||
"Float32Array": "$global/",
|
||||
"Float64Array": "$global/",
|
||||
"Map": "$global/",
|
||||
"Set": "$global/",
|
||||
# the JavaScript domain has no exception type for some reason...
|
||||
|
@ -156,11 +164,24 @@ for type, entries in DATA.items():
|
|||
USE_NAME_AS_LINK_TEXT,
|
||||
)
|
||||
|
||||
for key, url in [
|
||||
("void", "https://www.typescriptlang.org/docs/handbook/2/functions.html#void"),
|
||||
("any", "https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any"),
|
||||
for ty, key, url in [
|
||||
(
|
||||
"js:data",
|
||||
"void",
|
||||
"https://www.typescriptlang.org/docs/handbook/2/functions.html#void",
|
||||
),
|
||||
(
|
||||
"js:data",
|
||||
"any",
|
||||
"https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any",
|
||||
),
|
||||
(
|
||||
"js:class",
|
||||
"Record",
|
||||
"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type",
|
||||
),
|
||||
]:
|
||||
INVDATA["js:data"][key] = (
|
||||
INVDATA[ty][key] = (
|
||||
"typescript docs",
|
||||
"",
|
||||
url,
|
||||
|
|
|
@ -651,7 +651,7 @@ export class PyodideAPI {
|
|||
API.debug_ffi = debug;
|
||||
return orig;
|
||||
}
|
||||
|
||||
/** */
|
||||
static makeMemorySnapshot(): Uint8Array {
|
||||
if (!API.config._makeSnapshot) {
|
||||
throw new Error(
|
||||
|
@ -714,6 +714,7 @@ API.bootstrapFinalizedPromise = new Promise<void>(
|
|||
(r) => (bootstrapFinalized = r),
|
||||
);
|
||||
|
||||
/** @private */
|
||||
export function jsFinderHook(o: object) {
|
||||
if ("__all__" in o) {
|
||||
return;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import "./constants";
|
||||
|
||||
import { IN_NODE } from "./environments";
|
||||
import {
|
||||
nodeFsPromisesMod,
|
||||
|
@ -116,6 +115,7 @@ export type PackageLoadMetadata = {
|
|||
packageData: InternalPackageData;
|
||||
};
|
||||
|
||||
/** @hidden */
|
||||
export type PackageType =
|
||||
| "package"
|
||||
| "cpython_module"
|
||||
|
|
|
@ -3,6 +3,7 @@ import { scheduleCallback } from "./scheduler";
|
|||
|
||||
declare var Module: any;
|
||||
|
||||
/** @private */
|
||||
export function getExpectedKeys() {
|
||||
return [
|
||||
null,
|
||||
|
@ -56,6 +57,9 @@ export function makeGlobalsProxy(
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export type SnapshotConfig = {
|
||||
hiwireKeys: (string[] | null)[];
|
||||
immortalKeys: string[];
|
||||
|
@ -197,6 +201,7 @@ API.restoreSnapshot = function (snapshot: Uint8Array): SnapshotConfig {
|
|||
* This code is quite sensitive to the details of our setup, so it might break
|
||||
* if we move stuff around far away in the code base. Ideally over time we can
|
||||
* structure the code to make it less brittle.
|
||||
* @private
|
||||
*/
|
||||
export function syncUpSnapshotLoad1() {
|
||||
// hiwire init puts a null at the beginning of both the mortal and immortal tables.
|
||||
|
@ -227,6 +232,7 @@ function tableSet(idx: number, val: any): void {
|
|||
|
||||
/**
|
||||
* Fill in the JsRef table.
|
||||
* @private
|
||||
*/
|
||||
export function syncUpSnapshotLoad2(
|
||||
jsglobals: any,
|
||||
|
|
|
@ -175,6 +175,7 @@ declare global {
|
|||
export const __iscoroutinefunction: (a: number) => number;
|
||||
}
|
||||
|
||||
/** @hidden */
|
||||
export type FSNode = {
|
||||
timestamp: number;
|
||||
rdev: number;
|
||||
|
@ -182,6 +183,7 @@ export type FSNode = {
|
|||
mode: number;
|
||||
};
|
||||
|
||||
/** @hidden */
|
||||
export type FSStream = {
|
||||
tty?: boolean;
|
||||
seekable?: boolean;
|
||||
|
@ -189,8 +191,10 @@ export type FSStream = {
|
|||
node: FSNode;
|
||||
};
|
||||
|
||||
/** @hidden */
|
||||
export type FSStreamOps = FSStreamOpsGen<FSStream>;
|
||||
|
||||
/** @hidden */
|
||||
export type FSStreamOpsGen<T> = {
|
||||
open: (a: T) => void;
|
||||
close: (a: T) => void;
|
||||
|
@ -211,6 +215,7 @@ export type FSStreamOpsGen<T> = {
|
|||
) => number;
|
||||
};
|
||||
|
||||
/** @hidden */
|
||||
export interface FS {
|
||||
unlink: (path: string) => void;
|
||||
mkdirTree: (path: string, mode?: number) => void;
|
||||
|
@ -260,11 +265,15 @@ export interface FS {
|
|||
readFile(a: string): Uint8Array;
|
||||
}
|
||||
|
||||
/** @private */
|
||||
/** @hidden */
|
||||
export type PreRunFunc = (Module: Module) => void;
|
||||
|
||||
/** @hidden */
|
||||
export type ReadFileType = (path: string) => Uint8Array;
|
||||
|
||||
// File System-like type which can be passed to
|
||||
// Module.loadDynamicLibrary or Module.loadWebAssemblyModule
|
||||
/** @hidden */
|
||||
export type LoadDynlibFS = {
|
||||
readFile: ReadFileType;
|
||||
findObject: (path: string, dontResolveLastLink: boolean) => any;
|
||||
|
@ -272,12 +281,14 @@ export type LoadDynlibFS = {
|
|||
|
||||
type DSO = any;
|
||||
|
||||
/** @hidden */
|
||||
export interface LDSO {
|
||||
loadedLibsByName: {
|
||||
[key: string]: DSO;
|
||||
};
|
||||
}
|
||||
|
||||
/** @hidden */
|
||||
export interface Module {
|
||||
API: API;
|
||||
locateFile: (file: string) => string;
|
||||
|
@ -340,6 +351,7 @@ type LockfileInfo = {
|
|||
python: string;
|
||||
};
|
||||
|
||||
/** @hidden */
|
||||
export type Lockfile = {
|
||||
info: LockfileInfo;
|
||||
packages: Record<string, InternalPackageData>;
|
||||
|
|
Loading…
Reference in New Issue