build: add the basic type declaration (#30)

This commit is contained in:
Ziv 2021-05-11 14:20:07 +08:00 committed by GitHub
parent 5f5af0a4ab
commit ca85be9696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 5 deletions

View File

@ -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",

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -5,6 +5,7 @@
"allowJs":true,
"target": "es6",
"module": "commonjs",
"declaration": true,
"noUnusedLocals": true,
"noUnusedParameters": false,
"skipLibCheck": true,