build: add the basic type declaration (#30)
This commit is contained in:
parent
5f5af0a4ab
commit
ca85be9696
@ -13,6 +13,8 @@
|
|||||||
"bigdata"
|
"bigdata"
|
||||||
],
|
],
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"module": "dist/index.js",
|
||||||
|
"types": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"antlr4": "node build/antlr4.js",
|
"antlr4": "node build/antlr4.js",
|
||||||
"build": "rm -rf dist && tsc",
|
"build": "rm -rf dist && tsc",
|
||||||
|
@ -9,7 +9,7 @@ export default class FlinkSQL extends BasicParser {
|
|||||||
const lexer = <unknown> new FlinkSqlLexer(chars) as Lexer;
|
const lexer = <unknown> new FlinkSqlLexer(chars) as Lexer;
|
||||||
return lexer;
|
return lexer;
|
||||||
}
|
}
|
||||||
public createParserFromLexer(lexer: Lexer) {
|
public createParserFromLexer(lexer: Lexer): any {
|
||||||
const tokenStream = new CommonTokenStream(lexer);
|
const tokenStream = new CommonTokenStream(lexer);
|
||||||
return new FlinkSqlParser(tokenStream);
|
return new FlinkSqlParser(tokenStream);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ export default class GenericSQL extends BasicParser {
|
|||||||
const lexer = <unknown> new SqlLexer(chars) as Lexer;
|
const lexer = <unknown> new SqlLexer(chars) as Lexer;
|
||||||
return lexer;
|
return lexer;
|
||||||
}
|
}
|
||||||
public createParserFromLexer(lexer: Lexer) {
|
public createParserFromLexer(lexer: Lexer): any {
|
||||||
const tokenStream = new CommonTokenStream(lexer);
|
const tokenStream = new CommonTokenStream(lexer);
|
||||||
return new SqlParser(tokenStream);
|
return new SqlParser(tokenStream);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ export default class HiveSQL extends BasicParser {
|
|||||||
const lexer = <unknown> new HiveSqlLexer(chars) as Lexer;
|
const lexer = <unknown> new HiveSqlLexer(chars) as Lexer;
|
||||||
return lexer;
|
return lexer;
|
||||||
}
|
}
|
||||||
public createParserFromLexer(lexer: Lexer) {
|
public createParserFromLexer(lexer: Lexer): any {
|
||||||
const tokenStream = new CommonTokenStream(lexer);
|
const tokenStream = new CommonTokenStream(lexer);
|
||||||
return new HiveSql(tokenStream);
|
return new HiveSql(tokenStream);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ export default class PLSQLParser extends BasicParser {
|
|||||||
const lexer = <unknown> new PlSqlLexer(chars) as Lexer;
|
const lexer = <unknown> new PlSqlLexer(chars) as Lexer;
|
||||||
return lexer;
|
return lexer;
|
||||||
}
|
}
|
||||||
public createParserFromLexer(lexer: Lexer) {
|
public createParserFromLexer(lexer: Lexer): any {
|
||||||
const tokenStream = new CommonTokenStream(lexer);
|
const tokenStream = new CommonTokenStream(lexer);
|
||||||
return new PlSqlParser(tokenStream);
|
return new PlSqlParser(tokenStream);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ export default class SparkSQL extends BasicParser {
|
|||||||
const lexer = <unknown> new SparkSqlLexer(chars) as Lexer;
|
const lexer = <unknown> new SparkSqlLexer(chars) as Lexer;
|
||||||
return lexer;
|
return lexer;
|
||||||
}
|
}
|
||||||
public createParserFromLexer(lexer: Lexer) {
|
public createParserFromLexer(lexer: Lexer): any {
|
||||||
const tokenStream = new CommonTokenStream(lexer);
|
const tokenStream = new CommonTokenStream(lexer);
|
||||||
return new SparkSqlParser(tokenStream);
|
return new SparkSqlParser(tokenStream);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
"allowJs":true,
|
"allowJs":true,
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
|
"declaration": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user