diff options
| author | Divy Srivastava <dj.srivastava23@gmail.com> | 2021-07-30 01:15:11 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-29 21:45:11 +0200 |
| commit | 2b13bb694532904704c16bec4e8a47c386e681e2 (patch) | |
| tree | 0021131ce86873a5aa965d79b99185b3ca5c5aff /cli/dts | |
| parent | eece46f0d85faa90c97841a4f409be39272e809b (diff) | |
feat(runtime): implement navigator.hardwareConcurrency (#11448)
This commit implements "navigator.hardwareConcurrency" API, which
supersedes "Deno.systemCpuInfo()" API (which was removed in this commit).
Diffstat (limited to 'cli/dts')
| -rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 23 | ||||
| -rw-r--r-- | cli/dts/lib.deno.window.d.ts | 1 | ||||
| -rw-r--r-- | cli/dts/lib.deno.worker.d.ts | 1 |
3 files changed, 2 insertions, 23 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 199f05631..442da1e53 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -107,29 +107,6 @@ declare namespace Deno { swapFree: number; } - /** **Unstable** new API. yet to be vetted. - * - * Returns the total number of logical cpus in the system along with - * the speed measured in MHz. If either the syscall to get the core - * count or speed of the cpu is unsuccessful the value of the it - * is undefined. - * - * ```ts - * console.log(Deno.systemCpuInfo()); - * ``` - * - * Requires `allow-env` permission. - * - */ - export function systemCpuInfo(): SystemCpuInfo; - - export interface SystemCpuInfo { - /** Total number of logical cpus in the system */ - cores: number | undefined; - /** The speed of the cpu measured in MHz */ - speed: number | undefined; - } - /** **UNSTABLE**: new API, yet to be vetted. * * Open and initialize a plugin. diff --git a/cli/dts/lib.deno.window.d.ts b/cli/dts/lib.deno.window.d.ts index 00100768b..e515c19b7 100644 --- a/cli/dts/lib.deno.window.d.ts +++ b/cli/dts/lib.deno.window.d.ts @@ -37,6 +37,7 @@ declare var sessionStorage: Storage; declare class Navigator { constructor(); readonly gpu: GPU; + readonly hardwareConcurrency: number; } declare var navigator: Navigator; diff --git a/cli/dts/lib.deno.worker.d.ts b/cli/dts/lib.deno.worker.d.ts index 7d8f6078b..d35828135 100644 --- a/cli/dts/lib.deno.worker.d.ts +++ b/cli/dts/lib.deno.worker.d.ts @@ -50,6 +50,7 @@ declare class WorkerGlobalScope extends EventTarget { declare class WorkerNavigator { constructor(); readonly gpu: GPU; + readonly hardwareConcurrency: number; } declare var navigator: WorkerNavigator; |
