const
RendererContext
const
RouterContext
function
Head(props: PropsWithChildren<>)
function
Import(props: ImportProps)
function
Link(props: PropsWithChildren<LinkProps>)
function
NavLink(props: PropsWithChildren<NavLinkProps>)
function
SEO(props: SEOProps)
function
Scripts(props: PropsWithChildren<>)
function
Viewport(props: ViewportProps)
function
redirect(url: string, replace?: boolean)
function
useDeno(callback: () => (T | Promise<T>), browser?: boolean, deps?: ReadonlyArray<any>): T
function
useRouter(): RouterURL
function
withDeno(callback: () => (T | Promise<T>), browser?: boolean, deps?: ReadonlyArray<any>)
withDeno
allows you to use useDeno
hook with class component.
class MyComponent extends React.Component {
render() {
return <p>{this.props.version.deno}</p>
}
}
export default withDeno(() => Deno.version)(MyComponent)
deno doc mod.ts --json
[
{
"kind": "import",
"name": "AsyncUseDenoError",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 3,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://deno.land/x/aleph@v0.2.28/error.ts",
"imported": "AsyncUseDenoError"
}
},
{
"kind": "function",
"name": "Head",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/head.ts",
"line": 7,
"col": 15
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "props",
"optional": false,
"tsType": {
"repr": "PropsWithChildren",
"kind": "typeRef",
"typeRef": {
"typeParams": [
{
"repr": "",
"kind": "typeLiteral",
"typeLiteral": {
"methods": [],
"properties": [],
"callSignatures": [],
"indexSignatures": []
}
}
],
"typeName": "PropsWithChildren"
}
}
}
],
"returnType": null,
"isAsync": false,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "function",
"name": "Import",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/import.ts",
"line": 11,
"col": 15
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "props",
"optional": false,
"tsType": {
"repr": "ImportProps",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "ImportProps"
}
}
}
],
"returnType": null,
"isAsync": false,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "function",
"name": "Link",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/link.ts",
"line": 17,
"col": 15
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "props",
"optional": false,
"tsType": {
"repr": "PropsWithChildren",
"kind": "typeRef",
"typeRef": {
"typeParams": [
{
"repr": "LinkProps",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "LinkProps"
}
}
],
"typeName": "PropsWithChildren"
}
}
}
],
"returnType": null,
"isAsync": false,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "function",
"name": "NavLink",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/link.ts",
"line": 103,
"col": 0
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "props",
"optional": false,
"tsType": {
"repr": "PropsWithChildren",
"kind": "typeRef",
"typeRef": {
"typeParams": [
{
"repr": "NavLinkProps",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "NavLinkProps"
}
}
],
"typeName": "PropsWithChildren"
}
}
}
],
"returnType": null,
"isAsync": false,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "import",
"name": "React",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 1,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://esm.sh/react",
"imported": "default"
}
},
{
"kind": "variable",
"name": "RendererContext",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/context.ts",
"line": 18,
"col": 0
},
"jsDoc": null,
"variableDef": {
"tsType": null,
"kind": "const"
}
},
{
"kind": "import",
"name": "RouterContext",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 2,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://deno.land/x/aleph@v0.2.28/context.ts",
"imported": "RouterContext"
}
},
{
"kind": "variable",
"name": "RouterContext",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/context.ts",
"line": 4,
"col": 0
},
"jsDoc": null,
"variableDef": {
"tsType": null,
"kind": "const"
}
},
{
"kind": "import",
"name": "RouterURL",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 5,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://deno.land/x/aleph@v0.2.28/types.ts",
"imported": "RouterURL"
}
},
{
"kind": "import",
"name": "RouterURL",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/context.ts",
"line": 2,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://deno.land/x/aleph@v0.2.28/types.ts",
"imported": "RouterURL"
}
},
{
"kind": "function",
"name": "SEO",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/head.ts",
"line": 94,
"col": 0
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "props",
"optional": false,
"tsType": {
"repr": "SEOProps",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "SEOProps"
}
}
}
],
"returnType": null,
"isAsync": false,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "function",
"name": "Scripts",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/head.ts",
"line": 65,
"col": 0
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "props",
"optional": false,
"tsType": {
"repr": "PropsWithChildren",
"kind": "typeRef",
"typeRef": {
"typeParams": [
{
"repr": "",
"kind": "typeLiteral",
"typeLiteral": {
"methods": [],
"properties": [],
"callSignatures": [],
"indexSignatures": []
}
}
],
"typeName": "PropsWithChildren"
}
}
}
],
"returnType": null,
"isAsync": false,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "function",
"name": "Viewport",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/head.ts",
"line": 125,
"col": 0
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "props",
"optional": false,
"tsType": {
"repr": "ViewportProps",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "ViewportProps"
}
}
}
],
"returnType": null,
"isAsync": false,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "import",
"name": "createContext",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/context.ts",
"line": 1,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://esm.sh/react",
"imported": "createContext"
}
},
{
"kind": "import",
"name": "events",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 4,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://deno.land/x/aleph@v0.2.28/events.ts",
"imported": "default"
}
},
{
"kind": "function",
"name": "redirect",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/aleph.ts",
"line": 214,
"col": 0
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "url",
"optional": false,
"tsType": {
"repr": "string",
"kind": "keyword",
"keyword": "string"
}
},
{
"kind": "identifier",
"name": "replace",
"optional": true,
"tsType": {
"repr": "boolean",
"kind": "keyword",
"keyword": "boolean"
}
}
],
"returnType": null,
"isAsync": true,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "import",
"name": "useContext",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 1,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://esm.sh/react",
"imported": "useContext"
}
},
{
"kind": "function",
"name": "useDeno",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 11,
"col": 0
},
"jsDoc": null,
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "callback",
"optional": false,
"tsType": {
"repr": "",
"kind": "fnOrConstructor",
"fnOrConstructor": {
"constructor": false,
"tsType": {
"repr": "",
"kind": "parenthesized",
"parenthesized": {
"repr": "",
"kind": "union",
"union": [
{
"repr": "T",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "T"
}
},
{
"repr": "Promise",
"kind": "typeRef",
"typeRef": {
"typeParams": [
{
"repr": "T",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "T"
}
}
],
"typeName": "Promise"
}
}
]
}
},
"params": [],
"typeParams": []
}
}
},
{
"kind": "identifier",
"name": "browser",
"optional": true,
"tsType": {
"repr": "boolean",
"kind": "keyword",
"keyword": "boolean"
}
},
{
"kind": "identifier",
"name": "deps",
"optional": true,
"tsType": {
"repr": "ReadonlyArray",
"kind": "typeRef",
"typeRef": {
"typeParams": [
{
"repr": "any",
"kind": "keyword",
"keyword": "any"
}
],
"typeName": "ReadonlyArray"
}
}
}
],
"returnType": {
"repr": "T",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "T"
}
},
"isAsync": false,
"isGenerator": false,
"typeParams": [
{
"name": "T",
"default": {
"repr": "any",
"kind": "keyword",
"keyword": "any"
}
}
]
}
},
{
"kind": "import",
"name": "useEffect",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 1,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://esm.sh/react",
"imported": "useEffect"
}
},
{
"kind": "function",
"name": "useRouter",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 7,
"col": 0
},
"jsDoc": null,
"functionDef": {
"params": [],
"returnType": {
"repr": "RouterURL",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "RouterURL"
}
},
"isAsync": false,
"isGenerator": false,
"typeParams": []
}
},
{
"kind": "import",
"name": "useState",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 1,
"col": 0
},
"jsDoc": null,
"importDef": {
"src": "https://esm.sh/react",
"imported": "useState"
}
},
{
"kind": "function",
"name": "withDeno",
"location": {
"filename": "https://deno.land/x/aleph@v0.2.28/hooks.ts",
"line": 68,
"col": 0
},
"jsDoc": "`withDeno` allows you to use `useDeno` hook with class component.\n\n```javascript\n class MyComponent extends React.Component {\n render() {\n return <p>{this.props.version.deno}</p>\n }\n }\n export default withDeno(() => Deno.version)(MyComponent)\n```",
"functionDef": {
"params": [
{
"kind": "identifier",
"name": "callback",
"optional": false,
"tsType": {
"repr": "",
"kind": "fnOrConstructor",
"fnOrConstructor": {
"constructor": false,
"tsType": {
"repr": "",
"kind": "parenthesized",
"parenthesized": {
"repr": "",
"kind": "union",
"union": [
{
"repr": "T",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "T"
}
},
{
"repr": "Promise",
"kind": "typeRef",
"typeRef": {
"typeParams": [
{
"repr": "T",
"kind": "typeRef",
"typeRef": {
"typeParams": null,
"typeName": "T"
}
}
],
"typeName": "Promise"
}
}
]
}
},
"params": [],
"typeParams": []
}
}
},
{
"kind": "identifier",
"name": "browser",
"optional": true,
"tsType": {
"repr": "boolean",
"kind": "keyword",
"keyword": "boolean"
}
},
{
"kind": "identifier",
"name": "deps",
"optional": true,
"tsType": {
"repr": "ReadonlyArray",
"kind": "typeRef",
"typeRef": {
"typeParams": [
{
"repr": "any",
"kind": "keyword",
"keyword": "any"
}
],
"typeName": "ReadonlyArray"
}
}
}
],
"returnType": null,
"isAsync": false,
"isGenerator": false,
"typeParams": [
{
"name": "T"
}
]
}
}
]