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