Skip to content

Commit

Permalink
Updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunabe committed Jul 29, 2019
1 parent faa2d6c commit 5a2c6f6
Show file tree
Hide file tree
Showing 9 changed files with 3,779 additions and 69 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
@@ -1,3 +0,0 @@
[submodule "packages/tslabtypescript"]
path = packages/tslabtypescript
url = git@github.com:yunabe/tslabtypescript.git
10 changes: 9 additions & 1 deletion .vscode/settings.json
@@ -1,5 +1,13 @@
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "yapf"
"python.formatting.provider": "yapf",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
}
5 changes: 5 additions & 0 deletions jest.config.js
@@ -0,0 +1,5 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
rootDir: 'src',
};
10 changes: 9 additions & 1 deletion package.json
Expand Up @@ -7,10 +7,18 @@
"author": "Yu Watanabe",
"license": "MIT",
"dependencies": {
"glob": "^7.1.4",
"typescript": "^3.5.3",
"zeromq": "^5.1.0"
},
"scripts": {
"test": "jest"
},
"devDependencies": {
"@types/node": "^12.6.2"
"@types/glob": "^7.1.1",
"@types/jest": "^24.0.15",
"@types/node": "^12.6.8",
"jest": "^24.8.0",
"ts-jest": "^24.0.2"
}
}
1 change: 0 additions & 1 deletion packages/tslabtypescript
Submodule tslabtypescript deleted from aff7ef
44 changes: 44 additions & 0 deletions src/converter.spec.ts
@@ -0,0 +1,44 @@
import * as converter from "./converter";

export declare let hoge: string;

describe("converter diagnostics", () => {
it("syntax error", () => {
const conv = converter.createConverter();
const out = conv.convert("", `let x + 10;`);
expect(out.diagnostics).toEqual([
{
category: 1,
code: 1005,
length: 1,
messageText: "',' expected.",
start: 6
}
]);
});
/*
it("a", () => {
const conv = converter.createConverter();
conv.convert(
"",
`
export let zz = "***";
export module __tslab__ {
let zz = 10;
let zx = "...";
type x = number | string;
declare let hoge: string;
class Xyz {
mymethod(x: number): string {
return String(x);
}
}
interface IXyz {
imethod(): void;
}
type Combined = number | Xyz | IXyz;
}`
);
});
*/
});

0 comments on commit 5a2c6f6

Please sign in to comment.