Set up documentation generation

This commit is contained in:
dcodeIO
2018-03-19 01:12:18 +01:00
parent c0973433d6
commit 0fef69e445
47 changed files with 523 additions and 119 deletions

View File

@ -1,7 +1,10 @@
/**
* @file TypeScript definitions for Binaryen's C-API.
* @see https://github.com/WebAssembly/binaryen/blob/master/src/binaryen-c.h
*/
* TypeScript definitions for Binaryen's C-API.
*
* See: https://github.com/WebAssembly/binaryen/blob/master/src/binaryen-c.h
*
* @module glue/binaryen
*//***/
declare function _malloc(size: usize): usize;
declare function _free(ptr: usize): void;

View File

@ -1,6 +1,4 @@
/**
* @file Definitions for linking Binaryen with AssemblyScript.
*/
/** @module glue/js *//***/
declare function allocate_memory(size: usize): usize;
declare function free_memory(ptr: usize): void;

View File

@ -1,7 +1,3 @@
/**
* @file Glue code for linking Binaryen with AssemblyScript.
*/
// Copy Binaryen exports to global scope
const binaryen = global.Binaryen || require("binaryen");

View File

@ -1,6 +1,4 @@
/**
* @file I64 definitions for JavaScript.
*/
/** @module glue/js *//***/
declare type I64 = { __Long__: true }; // opaque

View File

@ -1,8 +1,3 @@
/**
* @file I64 implementation for JavaScript using long.js.
* @see https://github.com/dcodeIO/long.js
*/
const Long = global.Long || require("long");
global.i64_new = function(lo, hi) {

View File

@ -1,6 +1,8 @@
/**
* @file JavaScript glue code.
*/
* JavaScript glue code.
* @module glue/js
* @preferred
*//***/
import "../../../std/portable";
import "./binaryen";

View File

@ -1,6 +1,4 @@
/**
* @file Definitions for running JavaScript under node.js.
*/
/** @module glue/js *//***/
declare const global: any;
declare function require(name: string): any;

View File

@ -1,6 +1,4 @@
/**
* @file I64 wrapper for WebAssembly.
*/
/** @module glue/wasm *//***/
type I64 = i64;
@ -151,7 +149,7 @@ function i64_to_f64(value: I64): f64 {
return <f64>value;
}
import { CharCode } from "../../util/charcode";
import { CharCode } from "../../util";
@global
function i64_to_string(value: I64): string {

View File

@ -1,5 +1,7 @@
/**
* @file WebAssembly glue code.
*/
* WebAssembly glue code.
* @module glue/wasm
* @preferred
*//***/
import "./i64";