feat: add nukkit support

Signed-off-by: MiaoWoo <admin@yumc.pw>
backup
MiaoWoo 2020-02-24 16:25:54 +08:00
parent b5b9d3f230
commit c33b78b029
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# sponge bukkit jdk bungee
TYPE=bungee
# sponge bukkit jdk bungee nukkit
TYPE=nukkit
TARGET=../types/dist/typings
npx tsc src/build.ts --outDir dist
cd dist

View File

@ -178,7 +178,7 @@ typeMap['Matrix4d'] = 'any /*Matrix4d*/'
function mappingType(type: string): string {
let outType = typeMap[type] || type || 'any';
if (outType.indexOf('.') != -1) {
if (outType.startsWith('java.') || outType.startsWith('org.') || outType.startsWith('net.')) {
if (outType.startsWith('java.') || outType.startsWith('org.') || outType.startsWith('net.') || outType.startsWith('cn.')) {
} else {
outType = `any /*${outType}*/`