feat: add bungee support
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
7955f1663a
commit
54d12749dc
@ -1,5 +1,5 @@
|
|||||||
# sponge bukkit jdk
|
# sponge bukkit jdk bungee
|
||||||
TYPE=jdk
|
TYPE=bungee
|
||||||
TARGET=../types/dist/typings
|
TARGET=../types/dist/typings
|
||||||
npx tsc src/build.ts --outDir dist
|
npx tsc src/build.ts --outDir dist
|
||||||
cd dist
|
cd dist
|
||||||
|
@ -33,7 +33,7 @@ function convertJson2TypeDefiend(infile: string, outDir: string) {
|
|||||||
temp = temp.substr(0, temp.length - 2);
|
temp = temp.substr(0, temp.length - 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
temp += `${(obj.superclass) ? (' extends ' + obj.superclass.qualifiedName) : ''}`;
|
temp += `${(obj.superclass) ? (' extends ' + (obj.superclass.qualifiedName == "<any>" ? "object" : obj.superclass.qualifiedName)) : ''}`;
|
||||||
if (safeInterface.length > 0) {
|
if (safeInterface.length > 0) {
|
||||||
temp += ' implements '
|
temp += ' implements '
|
||||||
for (const ifs of safeInterface) {
|
for (const ifs of safeInterface) {
|
||||||
@ -178,7 +178,7 @@ typeMap['Matrix4d'] = 'any /*Matrix4d*/'
|
|||||||
function mappingType(type: string): string {
|
function mappingType(type: string): string {
|
||||||
let outType = typeMap[type] || type || 'any';
|
let outType = typeMap[type] || type || 'any';
|
||||||
if (outType.indexOf('.') != -1) {
|
if (outType.indexOf('.') != -1) {
|
||||||
if (outType.startsWith('java.') || outType.startsWith('org.')) {
|
if (outType.startsWith('java.') || outType.startsWith('org.') || outType.startsWith('net.')) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
outType = `any /*${outType}*/`
|
outType = `any /*${outType}*/`
|
||||||
|
Loading…
Reference in New Issue
Block a user