mirror of
https://github.com/denoland/deno.git
synced 2024-11-30 16:40:57 -05:00
75acec0aea
Fixes #15136 Currently `UnsafeCallback` class' `ref()` and `unref()` methods rely on the `event_loop_middleware` implementation in core. If even a single `UnsafeCallback` is ref'ed, then the FFI event loop middleware will always return `true` to signify that there may still be more work for the event loop to do. The middleware handling in core does not wait a moment to check again, but will instead synchronously directly re-poll the event loop and middlewares for more work. This becomes a live-loop. This PR introduces a `Future` implementation for the `CallbackInfo` struct that acts as the intermediary data storage between an `UnsafeCallback` and the `libffi` C callback. Ref'ing a callback now means calling an async op that binds to the `CallbackInfo` Future and only resolves once the callback is unref'ed. The `libffi` C callback will call the waker of this Future when it fires to make sure that the main thread wakes up to receive the callback. |
||
---|---|---|
.. | ||
lib.d.ts | ||
lib.deno.ns.d.ts | ||
lib.deno.shared_globals.d.ts | ||
lib.deno.unstable.d.ts | ||
lib.deno.window.d.ts | ||
lib.deno.worker.d.ts | ||
lib.deno_webgpu.d.ts | ||
lib.dom.asynciterable.d.ts | ||
lib.dom.d.ts | ||
lib.dom.extras.d.ts | ||
lib.dom.iterable.d.ts | ||
lib.es5.d.ts | ||
lib.es6.d.ts | ||
lib.es2015.collection.d.ts | ||
lib.es2015.core.d.ts | ||
lib.es2015.d.ts | ||
lib.es2015.generator.d.ts | ||
lib.es2015.iterable.d.ts | ||
lib.es2015.promise.d.ts | ||
lib.es2015.proxy.d.ts | ||
lib.es2015.reflect.d.ts | ||
lib.es2015.symbol.d.ts | ||
lib.es2015.symbol.wellknown.d.ts | ||
lib.es2016.array.include.d.ts | ||
lib.es2016.d.ts | ||
lib.es2016.full.d.ts | ||
lib.es2017.d.ts | ||
lib.es2017.full.d.ts | ||
lib.es2017.intl.d.ts | ||
lib.es2017.object.d.ts | ||
lib.es2017.sharedmemory.d.ts | ||
lib.es2017.string.d.ts | ||
lib.es2017.typedarrays.d.ts | ||
lib.es2018.asyncgenerator.d.ts | ||
lib.es2018.asynciterable.d.ts | ||
lib.es2018.d.ts | ||
lib.es2018.full.d.ts | ||
lib.es2018.intl.d.ts | ||
lib.es2018.promise.d.ts | ||
lib.es2018.regexp.d.ts | ||
lib.es2019.array.d.ts | ||
lib.es2019.d.ts | ||
lib.es2019.full.d.ts | ||
lib.es2019.object.d.ts | ||
lib.es2019.string.d.ts | ||
lib.es2019.symbol.d.ts | ||
lib.es2020.bigint.d.ts | ||
lib.es2020.d.ts | ||
lib.es2020.date.d.ts | ||
lib.es2020.full.d.ts | ||
lib.es2020.intl.d.ts | ||
lib.es2020.number.d.ts | ||
lib.es2020.promise.d.ts | ||
lib.es2020.sharedmemory.d.ts | ||
lib.es2020.string.d.ts | ||
lib.es2020.symbol.wellknown.d.ts | ||
lib.es2021.d.ts | ||
lib.es2021.full.d.ts | ||
lib.es2021.intl.d.ts | ||
lib.es2021.promise.d.ts | ||
lib.es2021.string.d.ts | ||
lib.es2021.weakref.d.ts | ||
lib.es2022.array.d.ts | ||
lib.es2022.d.ts | ||
lib.es2022.error.d.ts | ||
lib.es2022.full.d.ts | ||
lib.es2022.intl.d.ts | ||
lib.es2022.object.d.ts | ||
lib.es2022.sharedmemory.d.ts | ||
lib.es2022.string.d.ts | ||
lib.esnext.array.d.ts | ||
lib.esnext.d.ts | ||
lib.esnext.full.d.ts | ||
lib.esnext.intl.d.ts | ||
lib.scripthost.d.ts | ||
lib.webworker.d.ts | ||
lib.webworker.importscripts.d.ts | ||
lib.webworker.iterable.d.ts | ||
README.md | ||
typescript.d.ts |
How to upgrade TypeScript.
The files in this directory are mostly from the TypeScript repository. We currently (unfortunately) have a rather manual process for upgrading TypeScript. It works like this currently:
- Checkout typescript repo in a separate directory.
- Copy typescript.js into Deno repo.
- Copy d.ts files into dts directory.
So that might look something like this:
git clone https://github.com/microsoft/TypeScript.git
cd typescript
git checkout v3.9.7
rsync lib/typescript.js ~/src/deno/cli/tsc/00_typescript.js
rsync --exclude=protocol.d.ts --exclude=tsserverlibrary.d.ts --exclude=typescriptServices.d.ts lib/*.d.ts ~/src/deno/cli/dts/