mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* add weixin-app * add wx * add new line at end of file * tslint wx and wx-app * fixed test error * change project name weixin * rename * weixin-app Add param this * change discription of jweixin * add some Event declaration * change tslint config extends dtslint/dt.json * add defination of ccap, qr-image * remove redundant jsdoc * remove doc * allow overloads * inline some types * fix tslint error * ndarray add tslint export like a module style * ndarray make ndarray as a interface * ndarray: export type Data * add defination of cwise-parser * add type definition for cwise-copiler * fix tslint error * add type definition for cwise
27 lines
643 B
TypeScript
27 lines
643 B
TypeScript
import * as parser from "cwise-parser";
|
|
// import parser = require("cwise-parser");
|
|
import * as tape from "tape";
|
|
|
|
tape("basic tests", (t) => {
|
|
const parsed = parser((a: number, b: number, c: number) => {
|
|
a += b;
|
|
c = Math.cos(b);
|
|
});
|
|
|
|
t.equals(parsed.args.length, 3);
|
|
|
|
t.equals(parsed.args[0].lvalue, true);
|
|
t.equals(parsed.args[0].rvalue, true);
|
|
t.equals(parsed.args[0].count, 1);
|
|
|
|
t.equals(parsed.args[1].lvalue, false);
|
|
t.equals(parsed.args[1].rvalue, true);
|
|
t.equals(parsed.args[1].count, 2);
|
|
|
|
t.equals(parsed.args[2].lvalue, true);
|
|
t.equals(parsed.args[2].rvalue, false);
|
|
t.equals(parsed.args[2].count, 1);
|
|
|
|
t.end();
|
|
});
|