PHP-Deno

Application

Table of Contents

Classes

ParsedSource
TranspiledSource
The transpiled code to TypeScript source code, this is the result of `Deno\AST\ParsedSource::transpile().
ParseParams
ParseParams represent the arguments for Deno\AST\parse_module, which is used to parse TypeScript.
EmitOptions
TypeScript compiler options used when transpiling.
JsRuntime
The JsRuntime is a wrapper around a V8 isolate. It can execute ES6 including ES6 modules. The JsRuntime does not include any of the Deno.core.* ops, and does not provide implementations for web apis, such as fetch(). Use JsRuntime if you want to provide low-level v8 isolates, and implement extensions for all functionality such as local storage, remote requests etc.
JsFile
JsFile is a descriptor for JavaScript files that are loaded as part of the Extension->js_files array. The `code` of `JsFile` is executed when the JsRuntime is initiated.
ModuleSource
ModuleSource represents an ES6 module, including the source code and type. An ModuleSource should be returned from your module loader passed to JsRuntime's RuntimeOptions::module_loader property.
ModuleLoader
The module loader interface (don't trust the docs, this is an interface not a class!) Pass an instance of your class that implements `Deno\Core\ModuleLoader` to the `module_loader` property of `Deno\Runtime\WorkerOptions` or `Deno\Core\RuntimeOptions`
Extension
Extension contains PHP functions (ops) and associated js files which are exposed to JavaScript via the JsRuntime. PHP functions can be called from JavaScript via `Deno.core.$name` where `$name` is the array key string from the `ops` property.
RuntimeOptions
The options provided to the JsRuntime. Pass an instance of this class to Deno\Core\JsRuntime.
MainWorker
The Deno main worker. This includes a JsRuntime along with all the standard ops from Deno CLI, such as Deno.core.* and the web APIs such as TextEncoder etc. Use the MainWorker if you want to run programs that are written to run in Deno. The Deno provided ops such as `fetch()` uses it's own TLS and request stack.
WorkerOptions
The options to provide to Deno\Runtime\MainWorker.
BootstrapOptions
Common bootstrap options for MainWorker & WebWorker
PermissionsOptions

Functions

parse_module()  : ParsedSource
Parse a TypeScript (or similar) module. See ParseParams for options.

Functions


        
On this page

Search results