@idlizer/core 2.1.10-arktscgen-4 → 2.1.10-arktscgen-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/src/Language.d.ts +0 -1
- package/build/lib/src/Language.js +0 -2
- package/build/lib/src/LanguageWriters/ArgConvertors.d.ts +3 -2
- package/build/lib/src/LanguageWriters/ArgConvertors.js +20 -16
- package/build/lib/src/LanguageWriters/LanguageWriter.d.ts +5 -1
- package/build/lib/src/LanguageWriters/LanguageWriter.js +2 -0
- package/build/lib/src/LanguageWriters/convertors/CJConvertors.d.ts +0 -1
- package/build/lib/src/LanguageWriters/convertors/CJConvertors.js +1 -3
- package/build/lib/src/LanguageWriters/convertors/CppConvertors.d.ts +7 -7
- package/build/lib/src/LanguageWriters/convertors/CppConvertors.js +37 -23
- package/build/lib/src/LanguageWriters/convertors/KotlinConvertors.js +9 -5
- package/build/lib/src/LanguageWriters/convertors/TSConvertors.d.ts +4 -4
- package/build/lib/src/LanguageWriters/convertors/TSConvertors.js +73 -30
- package/build/lib/src/LanguageWriters/index.d.ts +2 -2
- package/build/lib/src/LanguageWriters/index.js +8 -13
- package/build/lib/src/LanguageWriters/writers/CJLanguageWriter.d.ts +2 -0
- package/build/lib/src/LanguageWriters/writers/CJLanguageWriter.js +13 -1
- package/build/lib/src/LanguageWriters/writers/CppLanguageWriter.d.ts +2 -0
- package/build/lib/src/LanguageWriters/writers/CppLanguageWriter.js +7 -1
- package/build/lib/src/LanguageWriters/writers/ETSLanguageWriter.d.ts +1 -2
- package/build/lib/src/LanguageWriters/writers/ETSLanguageWriter.js +0 -3
- package/build/lib/src/LanguageWriters/writers/JavaLanguageWriter.d.ts +2 -0
- package/build/lib/src/LanguageWriters/writers/JavaLanguageWriter.js +11 -0
- package/build/lib/src/LanguageWriters/writers/KotlinLanguageWriter.d.ts +8 -0
- package/build/lib/src/LanguageWriters/writers/KotlinLanguageWriter.js +75 -27
- package/build/lib/src/LanguageWriters/writers/TsLanguageWriter.d.ts +2 -0
- package/build/lib/src/LanguageWriters/writers/TsLanguageWriter.js +35 -12
- package/build/lib/src/LibraryInterface.d.ts +0 -1
- package/build/lib/src/from-idl/DtsPrinter.js +1 -1
- package/build/lib/src/from-idl/deserialize.js +1 -1
- package/build/lib/src/idl.d.ts +5 -0
- package/build/lib/src/idl.js +19 -1
- package/build/lib/src/index.d.ts +1 -4
- package/build/lib/src/index.js +1 -4
- package/build/lib/src/inheritance.d.ts +0 -2
- package/build/lib/src/inheritance.js +0 -17
- package/build/lib/src/peer-generation/ConflictingDeclarations.d.ts +6 -0
- package/build/lib/src/peer-generation/ConflictingDeclarations.js +43 -0
- package/build/lib/src/peer-generation/LayoutManager.d.ts +2 -0
- package/build/lib/src/peer-generation/LayoutManager.js +15 -0
- package/build/lib/src/peer-generation/Materialized.d.ts +2 -0
- package/build/lib/src/peer-generation/Materialized.js +14 -1
- package/build/lib/src/peer-generation/PeerLibrary.d.ts +0 -3
- package/build/lib/src/peer-generation/PeerLibrary.js +53 -37
- package/build/lib/src/peer-generation/idl/IdlNameConvertor.d.ts +6 -0
- package/build/lib/src/peer-generation/idl/IdlNameConvertor.js +15 -3
- package/build/lib/src/util.d.ts +5 -39
- package/build/lib/src/util.js +43 -369
- package/package.json +45 -49
|
@@ -5,26 +5,22 @@ import { createEmptyReferenceResolver } from "../peer-generation/ReferenceResolv
|
|
|
5
5
|
import { CJIDLTypeToForeignStringConvertor, CJInteropArgConvertor, CJTypeNameConvertor } from "./convertors/CJConvertors";
|
|
6
6
|
import { CppInteropArgConvertor, CppConvertor } from "./convertors/CppConvertors";
|
|
7
7
|
import { ETSInteropArgConvertor, ETSTypeNameConvertor } from "./convertors/ETSConvertors";
|
|
8
|
-
import {
|
|
9
|
-
import { KotlinTypeNameConvertor } from "./convertors/KotlinConvertors";
|
|
8
|
+
import { KotlinCInteropArgConvertor, KotlinTypeNameConvertor } from "./convertors/KotlinConvertors";
|
|
10
9
|
import { TSInteropArgConvertor, TSTypeNameConvertor } from "./convertors/TSConvertors";
|
|
11
10
|
import { CJLanguageWriter } from "./writers/CJLanguageWriter";
|
|
12
11
|
import { CppLanguageWriter } from "./writers/CppLanguageWriter";
|
|
13
12
|
import { ETSLanguageWriter } from "./writers/ETSLanguageWriter";
|
|
14
|
-
import { JavaLanguageWriter } from "./writers/JavaLanguageWriter";
|
|
15
13
|
import { KotlinLanguageWriter } from "./writers/KotlinLanguageWriter";
|
|
16
14
|
import { TSLanguageWriter } from "./writers/TsLanguageWriter";
|
|
17
15
|
export * from "./nameConvertor";
|
|
18
|
-
export function createLanguageWriter(language,
|
|
19
|
-
resolver !== null && resolver !== void 0 ? resolver : (resolver = EmptyReferenceResolver);
|
|
16
|
+
export function createLanguageWriter(language, library) {
|
|
20
17
|
const printer = new IndentedPrinter();
|
|
21
18
|
switch (language) {
|
|
22
|
-
case Language.TS: return new TSLanguageWriter(printer,
|
|
23
|
-
case Language.ARKTS: return new ETSLanguageWriter(printer,
|
|
24
|
-
case Language.
|
|
25
|
-
case Language.
|
|
26
|
-
case Language.
|
|
27
|
-
case Language.KOTLIN: return new KotlinLanguageWriter(printer, resolver, new KotlinTypeNameConvertor(resolver));
|
|
19
|
+
case Language.TS: return new TSLanguageWriter(printer, library, new TSTypeNameConvertor(library));
|
|
20
|
+
case Language.ARKTS: return new ETSLanguageWriter(printer, library, new ETSTypeNameConvertor(library), new CppConvertor(library));
|
|
21
|
+
case Language.CPP: return new CppLanguageWriter(printer, library, new CppConvertor(library), PrimitiveTypesInstance);
|
|
22
|
+
case Language.CJ: return new CJLanguageWriter(printer, library, new CJTypeNameConvertor(library), new CJIDLTypeToForeignStringConvertor(library));
|
|
23
|
+
case Language.KOTLIN: return new KotlinLanguageWriter(printer, library, new KotlinTypeNameConvertor(library));
|
|
28
24
|
default: throw new Error(`Language ${language.toString()} is not supported`);
|
|
29
25
|
}
|
|
30
26
|
}
|
|
@@ -33,9 +29,8 @@ export function createInteropArgConvertor(language) {
|
|
|
33
29
|
case Language.TS: return new TSInteropArgConvertor();
|
|
34
30
|
case Language.ARKTS: return new ETSInteropArgConvertor();
|
|
35
31
|
case Language.CPP: return CppInteropArgConvertor.INSTANCE;
|
|
36
|
-
case Language.JAVA: return new JavaInteropArgConvertor();
|
|
37
32
|
case Language.CJ: return new CJInteropArgConvertor();
|
|
38
|
-
case Language.KOTLIN: return new
|
|
33
|
+
case Language.KOTLIN: return new KotlinCInteropArgConvertor();
|
|
39
34
|
}
|
|
40
35
|
throw new Error(`InteropArgConvertor for language ${language} not implemented`);
|
|
41
36
|
}
|
|
@@ -75,6 +75,7 @@ export declare class CJLanguageWriter extends LanguageWriter {
|
|
|
75
75
|
resolver?: ReferenceResolver;
|
|
76
76
|
}): LanguageWriter;
|
|
77
77
|
getNodeName(type: idl.IDLNode): string;
|
|
78
|
+
get interopModule(): string;
|
|
78
79
|
writeClass(name: string, op: (writer: this) => void, superClass?: string, interfaces?: string[], generics?: string[]): void;
|
|
79
80
|
writeEnum(name: string, members: {
|
|
80
81
|
name: string;
|
|
@@ -105,6 +106,7 @@ export declare class CJLanguageWriter extends LanguageWriter {
|
|
|
105
106
|
writeGetterImplementation(method: Method, op?: (writer: this) => void): void;
|
|
106
107
|
writeSetterImplementation(method: Method, op: (writer: this) => void): void;
|
|
107
108
|
writeCJForeign(op: (writer: CJLanguageWriter) => void): void;
|
|
109
|
+
writeImports(moduleName: string, importedFeatures: string[], aliases: string[]): void;
|
|
108
110
|
private writeDeclaration;
|
|
109
111
|
writeNativeFunctionCall(printer: LanguageWriter, name: string, signature: MethodSignature): void;
|
|
110
112
|
writeNativeMethodDeclaration(method: Method): void;
|
|
@@ -16,7 +16,7 @@ import * as idl from "../../idl";
|
|
|
16
16
|
import { IndentedPrinter } from "../../IndentedPrinter";
|
|
17
17
|
import { CJKeywords } from "../../languageSpecificKeywords";
|
|
18
18
|
import { RuntimeType } from "../common";
|
|
19
|
-
import { AssignStatement, BlockStatement, DelegationType, ExpressionStatement, FieldModifier, LambdaExpression, LanguageWriter, MethodModifier, MethodSignature, ReturnStatement } from "../LanguageWriter";
|
|
19
|
+
import { AssignStatement, BlockStatement, DelegationType, ExpressionStatement, FieldModifier, LambdaExpression, LanguageWriter, MethodModifier, MethodSignature, ReturnStatement, } from "../LanguageWriter";
|
|
20
20
|
import { Language } from "../../Language";
|
|
21
21
|
import { indentedBy, isDefined } from "../../util";
|
|
22
22
|
////////////////////////////////////////////////////////////////
|
|
@@ -255,6 +255,9 @@ export class CJLanguageWriter extends LanguageWriter {
|
|
|
255
255
|
// rework for proper namespace logic
|
|
256
256
|
return this.typeConvertor.convert(type);
|
|
257
257
|
}
|
|
258
|
+
get interopModule() {
|
|
259
|
+
return "Interop";
|
|
260
|
+
}
|
|
258
261
|
writeClass(name, op, superClass, interfaces, generics) {
|
|
259
262
|
let extendsClause = superClass ? `${superClass}` : undefined;
|
|
260
263
|
let implementsClause = interfaces ? `${interfaces.join(' & ')}` : undefined;
|
|
@@ -401,6 +404,15 @@ export class CJLanguageWriter extends LanguageWriter {
|
|
|
401
404
|
this.popIndent();
|
|
402
405
|
this.print('}');
|
|
403
406
|
}
|
|
407
|
+
writeImports(moduleName, importedFeatures, aliases) {
|
|
408
|
+
if (importedFeatures.length !== aliases.length) {
|
|
409
|
+
throw new Error(`Inconsistent imports from ${moduleName}`);
|
|
410
|
+
}
|
|
411
|
+
for (let i = 0; i < importedFeatures.length; i++) {
|
|
412
|
+
const alias = aliases[i] ? ` as ${aliases[i]}` : ``;
|
|
413
|
+
this.writeExpressionStatement(this.makeString(`import ${moduleName}.${importedFeatures[i]}` + alias));
|
|
414
|
+
}
|
|
415
|
+
}
|
|
404
416
|
writeDeclaration(name, signature, modifiers, postfix, generics) {
|
|
405
417
|
let prefix = modifiers === null || modifiers === void 0 ? void 0 : modifiers.filter(it => this.supportedModifiers.includes(it)).map(it => this.mapMethodModifier(it)).join(" ");
|
|
406
418
|
prefix = prefix ? prefix + " " : "public ";
|
|
@@ -47,6 +47,7 @@ export declare class CppLanguageWriter extends CLikeLanguageWriter {
|
|
|
47
47
|
fork(options?: {
|
|
48
48
|
resolver?: ReferenceResolver;
|
|
49
49
|
}): LanguageWriter;
|
|
50
|
+
get interopModule(): string;
|
|
50
51
|
protected writeDeclaration(name: string, signature: MethodSignature, modifiers?: MethodModifier[], postfix?: string): void;
|
|
51
52
|
writeClass(name: string, op: (writer: this) => void, superClass?: string, interfaces?: string[]): void;
|
|
52
53
|
writeInterface(name: string, op: (writer: this) => void, superInterfaces?: string[], generics?: string[]): void;
|
|
@@ -63,6 +64,7 @@ export declare class CppLanguageWriter extends CLikeLanguageWriter {
|
|
|
63
64
|
}): void;
|
|
64
65
|
writeTypeDeclaration(decl: IDLTypedef): void;
|
|
65
66
|
writeConstant(constName: string, constType: IDLType, constVal?: string): void;
|
|
67
|
+
writeImports(moduleName: string, importedFeatures: string[], aliases: string[]): void;
|
|
66
68
|
/**
|
|
67
69
|
* Writes multiline comments decorated with stars
|
|
68
70
|
*/
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* See the License for the specific language governing permissions and
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
import { createReferenceType, forceAsNamedNode } from '../../idl';
|
|
15
|
+
import { createReferenceType, forceAsNamedNode, } from '../../idl';
|
|
16
16
|
import { Language } from '../../Language';
|
|
17
17
|
import { PrimitiveTypeList } from "../../peer-generation/PrimitiveType";
|
|
18
18
|
import { AssignStatement, BlockStatement, FieldModifier, PrintHint, MethodModifier, StringExpression, MethodStaticCallExpression } from "../LanguageWriter";
|
|
@@ -181,6 +181,9 @@ export class CppLanguageWriter extends CLikeLanguageWriter {
|
|
|
181
181
|
var _a;
|
|
182
182
|
return new CppLanguageWriter(new IndentedPrinter([], this.indentDepth()), (_a = options === null || options === void 0 ? void 0 : options.resolver) !== null && _a !== void 0 ? _a : this.resolver, this.typeConvertor, this.primitivesTypes);
|
|
183
183
|
}
|
|
184
|
+
get interopModule() {
|
|
185
|
+
throw new Error(`Modules are not supported in C++`);
|
|
186
|
+
}
|
|
184
187
|
writeDeclaration(name, signature, modifiers, postfix) {
|
|
185
188
|
const realName = this.classMode === 'normal' ? name : `${this.currentClass.at(0)}::${name}`;
|
|
186
189
|
const newModifiers = this.classMode === 'normal'
|
|
@@ -253,6 +256,9 @@ export class CppLanguageWriter extends CLikeLanguageWriter {
|
|
|
253
256
|
writeConstant(constName, constType, constVal) {
|
|
254
257
|
this.print(`${this.getNodeName(constType)} ${constName}${constVal ? ' = ' + constVal : ''};`);
|
|
255
258
|
}
|
|
259
|
+
writeImports(moduleName, importedFeatures, aliases) {
|
|
260
|
+
throw new Error(`Imports are not supported in C++`);
|
|
261
|
+
}
|
|
256
262
|
/**
|
|
257
263
|
* Writes multiline comments decorated with stars
|
|
258
264
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IndentedPrinter } from "../../IndentedPrinter";
|
|
2
|
-
import { LambdaExpression, LanguageExpression, LanguageStatement, LanguageWriter, MakeAssignOptions, MakeCastOptions, Method, MethodModifier, MethodSignature
|
|
2
|
+
import { LambdaExpression, LanguageExpression, LanguageStatement, LanguageWriter, MakeAssignOptions, MakeCastOptions, Method, MethodModifier, MethodSignature } from "../LanguageWriter";
|
|
3
3
|
import { TSLanguageWriter } from "./TsLanguageWriter";
|
|
4
4
|
import { IDLEnum, IDLType } from '../../idl';
|
|
5
5
|
import { ArgConvertor } from "../ArgConvertors";
|
|
@@ -45,7 +45,6 @@ export declare function makeArrayTypeCheckCall(valueAccessor: string, typeName:
|
|
|
45
45
|
export declare class ETSLanguageWriter extends TSLanguageWriter {
|
|
46
46
|
private arrayConvertor;
|
|
47
47
|
constructor(printer: IndentedPrinter, resolver: ReferenceResolver, typeConvertor: IdlNameConvertor, arrayConvertor: IdlNameConvertor);
|
|
48
|
-
pushNamespace(namespace: string, options: NamespaceOptions): void;
|
|
49
48
|
fork(options?: {
|
|
50
49
|
resolver?: ReferenceResolver;
|
|
51
50
|
}): LanguageWriter;
|
|
@@ -175,9 +175,6 @@ export class ETSLanguageWriter extends TSLanguageWriter {
|
|
|
175
175
|
super(printer, resolver, typeConvertor, Language.ARKTS);
|
|
176
176
|
this.arrayConvertor = arrayConvertor;
|
|
177
177
|
}
|
|
178
|
-
pushNamespace(namespace, options) {
|
|
179
|
-
super.pushNamespace(namespace, options);
|
|
180
|
-
}
|
|
181
178
|
fork(options) {
|
|
182
179
|
var _a;
|
|
183
180
|
return new ETSLanguageWriter(new IndentedPrinter([], this.indentDepth()), (_a = options === null || options === void 0 ? void 0 : options.resolver) !== null && _a !== void 0 ? _a : this.resolver, this.typeConvertor, this.arrayConvertor);
|
|
@@ -29,6 +29,7 @@ export declare class JavaLanguageWriter extends CLikeLanguageWriter {
|
|
|
29
29
|
fork(options?: {
|
|
30
30
|
resolver?: ReferenceResolver;
|
|
31
31
|
}): LanguageWriter;
|
|
32
|
+
get interopModule(): string;
|
|
32
33
|
writeClass(name: string, op: (writer: this) => void, superClass?: string, interfaces?: string[], generics?: string[], isDeclared?: boolean, isExport?: boolean): void;
|
|
33
34
|
writeInterface(name: string, op: (writer: this) => void, superInterfaces?: string[], generics?: string[]): void;
|
|
34
35
|
writeMethodCall(receiver: string, method: string, params: string[], nullable?: boolean): void;
|
|
@@ -44,6 +45,7 @@ export declare class JavaLanguageWriter extends CLikeLanguageWriter {
|
|
|
44
45
|
}, initExpr?: LanguageExpression): void;
|
|
45
46
|
writeTypeDeclaration(decl: idl.IDLTypedef): void;
|
|
46
47
|
writeConstant(constName: string, constType: idl.IDLType, constVal?: string): void;
|
|
48
|
+
writeImports(moduleName: string, importedFeatures: string[], aliases: string[]): void;
|
|
47
49
|
makeAssign(variableName: string, type: idl.IDLType | undefined, expr: LanguageExpression, isDeclared?: boolean, isConst?: boolean): LanguageStatement;
|
|
48
50
|
makeLambda(signature: MethodSignature, body?: LanguageStatement[]): LanguageExpression;
|
|
49
51
|
makeReturn(expr: LanguageExpression): LanguageStatement;
|
|
@@ -105,6 +105,9 @@ export class JavaLanguageWriter extends CLikeLanguageWriter {
|
|
|
105
105
|
var _a;
|
|
106
106
|
return new JavaLanguageWriter(new IndentedPrinter([], this.indentDepth()), (_a = options === null || options === void 0 ? void 0 : options.resolver) !== null && _a !== void 0 ? _a : this.resolver, this.typeConvertor);
|
|
107
107
|
}
|
|
108
|
+
get interopModule() {
|
|
109
|
+
return "org.koalaui.interop";
|
|
110
|
+
}
|
|
108
111
|
writeClass(name, op, superClass, interfaces, generics, isDeclared, isExport = true) {
|
|
109
112
|
let genericsClause = (generics === null || generics === void 0 ? void 0 : generics.length) ? `<${generics.join(', ')}> ` : ``;
|
|
110
113
|
let extendsClause = superClass ? ` extends ${superClass}` : '';
|
|
@@ -179,6 +182,14 @@ export class JavaLanguageWriter extends CLikeLanguageWriter {
|
|
|
179
182
|
writeConstant(constName, constType, constVal) {
|
|
180
183
|
throw new Error("writeConstant for Java is not implemented yet.");
|
|
181
184
|
}
|
|
185
|
+
writeImports(moduleName, importedFeatures, aliases) {
|
|
186
|
+
if (importedFeatures.length !== aliases.length) {
|
|
187
|
+
throw new Error(`Inconsistent imports from ${moduleName}`);
|
|
188
|
+
}
|
|
189
|
+
for (let i = 0; i < importedFeatures.length; i++) {
|
|
190
|
+
this.writeExpressionStatement(this.makeString(`import ${moduleName}.${importedFeatures[i]}`));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
182
193
|
makeAssign(variableName, type, expr, isDeclared = true, isConst = true) {
|
|
183
194
|
return new JavaAssignStatement(variableName, type, expr, isDeclared, isConst);
|
|
184
195
|
}
|
|
@@ -61,6 +61,8 @@ export declare class KotlinLanguageWriter extends LanguageWriter {
|
|
|
61
61
|
resolver?: ReferenceResolver;
|
|
62
62
|
}): LanguageWriter;
|
|
63
63
|
getNodeName(type: idl.IDLNode): string;
|
|
64
|
+
get interopModule(): string;
|
|
65
|
+
maybeSemicolon(): string;
|
|
64
66
|
writeClass(name: string, op: (writer: this) => void, superClass?: string, interfaces?: string[], generics?: string[], isDeclared?: boolean, isAbstract?: boolean): void;
|
|
65
67
|
writeInterface(name: string, op: (writer: this) => void, superInterfaces?: string[], generics?: string[], isDeclared?: boolean): void;
|
|
66
68
|
writeFunctionDeclaration(name: string, signature: MethodSignature, generics?: string[]): void;
|
|
@@ -78,6 +80,11 @@ export declare class KotlinLanguageWriter extends LanguageWriter {
|
|
|
78
80
|
private writeDeclaration;
|
|
79
81
|
writeFieldDeclaration(name: string, type: idl.IDLType, modifiers: FieldModifier[] | undefined, optional: boolean, initExpr?: LanguageExpression): void;
|
|
80
82
|
writeNativeMethodDeclaration(method: Method): void;
|
|
83
|
+
private printForeignApiOptIn;
|
|
84
|
+
private get foreignApiOptIn();
|
|
85
|
+
private isPrimitiveArray;
|
|
86
|
+
private pinArrayArgument;
|
|
87
|
+
private unpinArrayArgument;
|
|
81
88
|
private convertInteropArgument;
|
|
82
89
|
private convertInteropReturnValue;
|
|
83
90
|
writeMethodDeclaration(name: string, signature: MethodSignature, modifiers?: MethodModifier[]): void;
|
|
@@ -94,6 +101,7 @@ export declare class KotlinLanguageWriter extends LanguageWriter {
|
|
|
94
101
|
writeSetterImplementation(method: Method, op: (writer: this) => void): void;
|
|
95
102
|
writeTypeDeclaration(decl: idl.IDLTypedef): void;
|
|
96
103
|
writeConstant(constName: string, constType: idl.IDLType, constVal?: string): void;
|
|
104
|
+
writeImports(moduleName: string, importedFeatures: string[], aliases: string[]): void;
|
|
97
105
|
makeNull(): LanguageExpression;
|
|
98
106
|
makeAssign(variableName: string, type: idl.IDLType | undefined, expr: LanguageExpression, isDeclared?: boolean, isConst?: boolean, options?: MakeAssignOptions): LanguageStatement;
|
|
99
107
|
makeLambda(signature: MethodSignature, body?: LanguageStatement[]): LanguageExpression;
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
import * as idl from '../../idl';
|
|
16
16
|
import { Language } from '../../Language';
|
|
17
17
|
import { IndentedPrinter } from "../../IndentedPrinter";
|
|
18
|
-
import { AssignStatement, BlockStatement, DelegationType, ExpressionStatement, FieldModifier, LambdaExpression, LanguageWriter, Method, MethodModifier, MethodSignature, ReturnStatement } from "../LanguageWriter";
|
|
18
|
+
import { AssignStatement, BlockStatement, DelegationType, ExpressionStatement, FieldModifier, LambdaExpression, LanguageWriter, Method, MethodModifier, MethodSignature, ReturnStatement, } from "../LanguageWriter";
|
|
19
19
|
import { RuntimeType } from "../common";
|
|
20
20
|
import { isDefined } from "../../util";
|
|
21
|
-
import { removePoints } from '
|
|
21
|
+
import { removePoints } from '../../util';
|
|
22
22
|
export class KotlinLambdaReturnStatement {
|
|
23
23
|
constructor(expression) {
|
|
24
24
|
this.expression = expression;
|
|
@@ -87,7 +87,7 @@ export class KotlinEnumWithGetter {
|
|
|
87
87
|
const enumType = idl.createReferenceType(this.enumEntity);
|
|
88
88
|
writer.makeStaticBlock(() => {
|
|
89
89
|
members.forEach(it => {
|
|
90
|
-
writer.writeFieldDeclaration(it.name,
|
|
90
|
+
writer.writeFieldDeclaration(it.name, enumType, [FieldModifier.PUBLIC, FieldModifier.STATIC, FieldModifier.FINAL], false, writer.makeString(`${mangledName}(${it.stringId ? `\"${it.stringId}\"` : it.numberId})`));
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
const value = 'value';
|
|
@@ -230,6 +230,10 @@ export class KotlinLanguageWriter extends LanguageWriter {
|
|
|
230
230
|
}
|
|
231
231
|
return this.typeConvertor.convert(type);
|
|
232
232
|
}
|
|
233
|
+
get interopModule() {
|
|
234
|
+
return "koalaui.interop";
|
|
235
|
+
}
|
|
236
|
+
maybeSemicolon() { return ""; }
|
|
233
237
|
writeClass(name, op, superClass, interfaces, generics, isDeclared, isAbstract) {
|
|
234
238
|
let extendsClause = superClass ? `${superClass}` : undefined;
|
|
235
239
|
let implementsClause = interfaces ? `${interfaces.join(' , ')}` : undefined;
|
|
@@ -293,32 +297,75 @@ export class KotlinLanguageWriter extends LanguageWriter {
|
|
|
293
297
|
let name = method.name;
|
|
294
298
|
let signature = method.signature;
|
|
295
299
|
this.writeMethodImplementation(new Method(name, signature, [MethodModifier.STATIC]), writer => {
|
|
300
|
+
const pins = signature.args.flatMap((type, index) => this.pinArrayArgument(signature.argName(index), type));
|
|
301
|
+
const unpins = signature.args.flatMap((type, index) => this.unpinArrayArgument(signature.argName(index), type));
|
|
302
|
+
pins.filter(it => !!it).forEach(it => this.writeStatement(it));
|
|
296
303
|
const args = signature.args.map((type, index) => this.convertInteropArgument(signature.argName(index), type));
|
|
304
|
+
this.printForeignApiOptIn();
|
|
297
305
|
const interopCallExpression = this.makeFunctionCall(`kotlin${name}`, args);
|
|
298
306
|
if (signature.returnType === idl.IDLVoidType) {
|
|
299
307
|
this.writeExpressionStatement(interopCallExpression);
|
|
308
|
+
unpins.filter(it => !!it).forEach(it => this.writeStatement(it));
|
|
300
309
|
return;
|
|
301
310
|
}
|
|
302
311
|
const retval = "retval";
|
|
303
312
|
this.writeStatement(this.makeAssign(retval, undefined, interopCallExpression));
|
|
313
|
+
unpins.filter(it => !!it).forEach(it => this.writeStatement(it));
|
|
314
|
+
this.printForeignApiOptIn();
|
|
304
315
|
this.writeStatement(this.makeReturn(this.convertInteropReturnValue(retval, signature.returnType)));
|
|
305
316
|
});
|
|
306
317
|
}
|
|
318
|
+
printForeignApiOptIn() {
|
|
319
|
+
this.writeStatement(this.foreignApiOptIn);
|
|
320
|
+
}
|
|
321
|
+
get foreignApiOptIn() {
|
|
322
|
+
return new ExpressionStatement(this.makeString("@OptIn(ExperimentalForeignApi::class)"));
|
|
323
|
+
}
|
|
324
|
+
isPrimitiveArray(type) {
|
|
325
|
+
if (!idl.IDLContainerUtils.isSequence(type)) {
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
const elementType = type.elementType[0];
|
|
329
|
+
const allowedTypes = [idl.IDLU8Type, idl.IDLI32Type, idl.IDLF32Type];
|
|
330
|
+
return allowedTypes.includes(elementType);
|
|
331
|
+
}
|
|
332
|
+
pinArrayArgument(varName, type) {
|
|
333
|
+
if (this.isPrimitiveArray(type)) {
|
|
334
|
+
const pinCall = this.makeMethodCall(varName, "pin", []);
|
|
335
|
+
const assign = this.makeAssign(`${varName}Pinned`, undefined, pinCall, true, true);
|
|
336
|
+
return [this.foreignApiOptIn, assign];
|
|
337
|
+
}
|
|
338
|
+
return [];
|
|
339
|
+
}
|
|
340
|
+
unpinArrayArgument(varName, type) {
|
|
341
|
+
if (this.isPrimitiveArray(type)) {
|
|
342
|
+
const call = new ExpressionStatement(this.makeMethodCall(`${varName}Pinned`, "unpin", []));
|
|
343
|
+
return [this.foreignApiOptIn, call];
|
|
344
|
+
}
|
|
345
|
+
return [];
|
|
346
|
+
}
|
|
307
347
|
convertInteropArgument(varName, type) {
|
|
308
348
|
const realInteropType = this.getNodeName(type);
|
|
309
349
|
let expr;
|
|
310
350
|
switch (realInteropType) {
|
|
351
|
+
case "UByteArray":
|
|
352
|
+
case "IntArray":
|
|
353
|
+
case "FloatArray":
|
|
354
|
+
expr = `${varName}Pinned.addressOf(0)`;
|
|
355
|
+
break;
|
|
311
356
|
case "KPointer":
|
|
357
|
+
case "KNativePointer":
|
|
312
358
|
case "KSerializerBuffer":
|
|
313
359
|
expr = `${varName}.toCPointer<CPointed>()!!`;
|
|
314
360
|
break;
|
|
361
|
+
case "BigInteger":
|
|
315
362
|
case "KInt":
|
|
316
363
|
case "KLong":
|
|
317
364
|
case "KFloat":
|
|
318
365
|
case "KDouble":
|
|
366
|
+
case "String":
|
|
319
367
|
case "KStringPtr":
|
|
320
368
|
case "KBoolean":
|
|
321
|
-
case "Float64":
|
|
322
369
|
case "Float":
|
|
323
370
|
case "Double":
|
|
324
371
|
case "UInt":
|
|
@@ -333,12 +380,13 @@ export class KotlinLanguageWriter extends LanguageWriter {
|
|
|
333
380
|
const realInteropType = this.getNodeName(type);
|
|
334
381
|
let expr;
|
|
335
382
|
switch (realInteropType) {
|
|
383
|
+
case "KNativePointer":
|
|
336
384
|
case "KPointer":
|
|
337
385
|
expr = `${varName}.toLong()`;
|
|
338
386
|
break;
|
|
339
387
|
case "KInt":
|
|
340
388
|
case "KLong":
|
|
341
|
-
case "
|
|
389
|
+
case "BigInteger":
|
|
342
390
|
case "Float":
|
|
343
391
|
case "Double":
|
|
344
392
|
case "Long":
|
|
@@ -389,30 +437,21 @@ export class KotlinLanguageWriter extends LanguageWriter {
|
|
|
389
437
|
writeProperty(propName, propType, modifiers, getter, setter, initExpr) {
|
|
390
438
|
let containerName = propName.concat("_container");
|
|
391
439
|
let truePropName = this.escapeKeyword(propName);
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}
|
|
397
|
-
let isMutable = !modifiers.includes(FieldModifier.READONLY);
|
|
440
|
+
const isReadonly = modifiers.includes(FieldModifier.READONLY);
|
|
441
|
+
const isGetter = modifiers.includes(FieldModifier.GET);
|
|
442
|
+
const isSetter = modifiers.includes(FieldModifier.SET);
|
|
443
|
+
const isImmutable = isReadonly || (isGetter && !isSetter);
|
|
398
444
|
let isOverride = modifiers.includes(FieldModifier.OVERRIDE);
|
|
399
445
|
let initializer = initExpr ? ` = ${initExpr.asString()}` : "";
|
|
400
|
-
this.print(`${isOverride ? 'override ' : ''}public ${
|
|
446
|
+
this.print(`${isOverride ? 'override ' : ''}public ${isImmutable ? "val " : "var "}${truePropName}: ${this.getNodeName(propType)}${initializer}`);
|
|
401
447
|
if (getter) {
|
|
402
448
|
this.pushIndent();
|
|
403
449
|
this.writeGetterImplementation(getter.method, getter.op);
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
this.print(`set(${truePropName}) {`);
|
|
410
|
-
this.pushIndent();
|
|
411
|
-
this.print(`${containerName} = ${truePropName}`);
|
|
412
|
-
this.popIndent();
|
|
413
|
-
this.print(`}`);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
450
|
+
this.popIndent();
|
|
451
|
+
}
|
|
452
|
+
if (setter) {
|
|
453
|
+
this.pushIndent();
|
|
454
|
+
this.writeSetterImplementation(setter.method, setter ? setter.op : (writer) => { writer.print(`${containerName} = ${truePropName}`); });
|
|
416
455
|
this.popIndent();
|
|
417
456
|
}
|
|
418
457
|
}
|
|
@@ -434,7 +473,16 @@ export class KotlinLanguageWriter extends LanguageWriter {
|
|
|
434
473
|
throw new Error("Not implemented");
|
|
435
474
|
}
|
|
436
475
|
writeConstant(constName, constType, constVal) {
|
|
437
|
-
|
|
476
|
+
this.print(`val ${constName} = ${constVal}`);
|
|
477
|
+
}
|
|
478
|
+
writeImports(moduleName, importedFeatures, aliases) {
|
|
479
|
+
if (importedFeatures.length !== aliases.length) {
|
|
480
|
+
throw new Error(`Inconsistent imports from ${moduleName}`);
|
|
481
|
+
}
|
|
482
|
+
for (let i = 0; i < importedFeatures.length; i++) {
|
|
483
|
+
const alias = aliases[i] ? ` as ${aliases[i]}` : ``;
|
|
484
|
+
this.writeExpressionStatement(this.makeString(`import ${moduleName}.${importedFeatures[i]}` + alias));
|
|
485
|
+
}
|
|
438
486
|
}
|
|
439
487
|
makeNull() {
|
|
440
488
|
return this.makeString('null');
|
|
@@ -529,14 +577,14 @@ export class KotlinLanguageWriter extends LanguageWriter {
|
|
|
529
577
|
}
|
|
530
578
|
else {
|
|
531
579
|
const op = equals ? "==" : "!=";
|
|
532
|
-
return this.makeNaryOp(op, [this.makeRuntimeType(type), this.makeString(`${typeVarName}
|
|
580
|
+
return this.makeNaryOp(op, [this.makeRuntimeType(type), this.makeString(`${typeVarName}`)]);
|
|
533
581
|
}
|
|
534
582
|
}
|
|
535
583
|
getTagType() {
|
|
536
584
|
return idl.createReferenceType("Tag");
|
|
537
585
|
}
|
|
538
586
|
getRuntimeType() {
|
|
539
|
-
return idl.
|
|
587
|
+
return idl.IDLI8Type;
|
|
540
588
|
}
|
|
541
589
|
makeTupleAssign(receiver, fields) {
|
|
542
590
|
throw new Error("Not implemented");
|
|
@@ -37,6 +37,7 @@ export declare class TSLanguageWriter extends LanguageWriter {
|
|
|
37
37
|
resolver?: ReferenceResolver;
|
|
38
38
|
}): LanguageWriter;
|
|
39
39
|
getNodeName(type: idl.IDLNode): string;
|
|
40
|
+
get interopModule(): string;
|
|
40
41
|
writeClass(name: string, op: (writer: this) => void, superClass?: string, interfaces?: string[], generics?: string[], isDeclared?: boolean, isAbstract?: boolean): void;
|
|
41
42
|
writeInterface(name: string, op: (writer: this) => void, superInterfaces?: string[], generics?: string[], isDeclared?: boolean): void;
|
|
42
43
|
writeFunctionDeclaration(name: string, signature: MethodSignature, generics?: string[]): void;
|
|
@@ -65,6 +66,7 @@ export declare class TSLanguageWriter extends LanguageWriter {
|
|
|
65
66
|
}, initExpr?: LanguageExpression): void;
|
|
66
67
|
writeTypeDeclaration(decl: idl.IDLTypedef): void;
|
|
67
68
|
writeConstant(constName: string, constType: idl.IDLType, constVal?: string): void;
|
|
69
|
+
writeImports(moduleName: string, importedFeatures: string[], aliases: string[]): void;
|
|
68
70
|
private writeDeclaration;
|
|
69
71
|
makeNull(type?: idl.IDLOptionalType): LanguageExpression;
|
|
70
72
|
makeAssign(variableName: string, type: idl.IDLType | undefined, expr: LanguageExpression | undefined, isDeclared?: boolean, isConst?: boolean, options?: MakeAssignOptions): LanguageStatement;
|
|
@@ -148,6 +148,9 @@ export class TSLanguageWriter extends LanguageWriter {
|
|
|
148
148
|
}
|
|
149
149
|
return this.typeConvertor.convert(type);
|
|
150
150
|
}
|
|
151
|
+
get interopModule() {
|
|
152
|
+
return "@koalaui/interop";
|
|
153
|
+
}
|
|
151
154
|
writeClass(name, op, superClass, interfaces, generics, isDeclared, isAbstract) {
|
|
152
155
|
let extendsClause = superClass ? ` extends ${superClass}` : '';
|
|
153
156
|
let implementsClause = interfaces ? ` implements ${interfaces.join(",")}` : '';
|
|
@@ -207,11 +210,22 @@ export class TSLanguageWriter extends LanguageWriter {
|
|
|
207
210
|
this.printer.print("}");
|
|
208
211
|
}
|
|
209
212
|
writeFieldDeclaration(name, type, modifiers, optional, initExpr) {
|
|
210
|
-
const init = initExpr != undefined ? ` = ${initExpr.asString()}` : ``;
|
|
211
213
|
let prefix = this.makeFieldModifiersList(modifiers);
|
|
212
214
|
if (prefix)
|
|
213
215
|
prefix += " ";
|
|
214
|
-
|
|
216
|
+
const typeName = this.getNodeName(type);
|
|
217
|
+
const isGetter = modifiers === null || modifiers === void 0 ? void 0 : modifiers.includes(FieldModifier.GET);
|
|
218
|
+
const isSetter = modifiers === null || modifiers === void 0 ? void 0 : modifiers.includes(FieldModifier.SET);
|
|
219
|
+
if (isGetter) {
|
|
220
|
+
this.printer.print(`${prefix}get ${name}(): ${typeName}`);
|
|
221
|
+
}
|
|
222
|
+
if (isSetter) {
|
|
223
|
+
this.printer.print(`${prefix}set ${name}(value: ${typeName})`);
|
|
224
|
+
}
|
|
225
|
+
if (isGetter || isSetter)
|
|
226
|
+
return;
|
|
227
|
+
const init = initExpr != undefined ? ` = ${initExpr.asString()}` : ``;
|
|
228
|
+
this.printer.print(`${prefix}${name}${optional ? "?" : ""}: ${typeName}${init}`);
|
|
215
229
|
}
|
|
216
230
|
writeNativeMethodDeclaration(method) {
|
|
217
231
|
let name = method.name;
|
|
@@ -248,7 +262,6 @@ export class TSLanguageWriter extends LanguageWriter {
|
|
|
248
262
|
}
|
|
249
263
|
writeProperty(propName, propType, modifiers, getter, setter, initExpr) {
|
|
250
264
|
let isStatic = modifiers.includes(FieldModifier.STATIC);
|
|
251
|
-
let isMutable = !modifiers.includes(FieldModifier.READONLY);
|
|
252
265
|
let containerName = propName.concat("_container");
|
|
253
266
|
if (getter) {
|
|
254
267
|
if (!getter.op) {
|
|
@@ -258,17 +271,17 @@ export class TSLanguageWriter extends LanguageWriter {
|
|
|
258
271
|
(writer) => {
|
|
259
272
|
writer.print(`return ${containerName}`);
|
|
260
273
|
});
|
|
261
|
-
if (isMutable) {
|
|
262
|
-
const setSignature = new NamedMethodSignature(idl.IDLVoidType, [propType], [propName]);
|
|
263
|
-
this.writeSetterImplementation(new Method(propName, setSignature, isStatic ? [MethodModifier.STATIC] : []), setter ? setter.op :
|
|
264
|
-
(writer) => {
|
|
265
|
-
writer.print(`${containerName} = ${propName}`);
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
274
|
}
|
|
269
|
-
|
|
270
|
-
|
|
275
|
+
if (setter) {
|
|
276
|
+
const setSignature = new NamedMethodSignature(idl.IDLVoidType, [propType], [propName]);
|
|
277
|
+
this.writeSetterImplementation(new Method(propName, setSignature, isStatic ? [MethodModifier.STATIC] : []), setter ? setter.op :
|
|
278
|
+
(writer) => {
|
|
279
|
+
writer.print(`${containerName} = ${propName}`);
|
|
280
|
+
});
|
|
271
281
|
}
|
|
282
|
+
if (getter || setter)
|
|
283
|
+
return;
|
|
284
|
+
this.writeFieldDeclaration(propName, propType, modifiers, idl.isOptionalType(propType), initExpr);
|
|
272
285
|
}
|
|
273
286
|
writeTypeDeclaration(decl) {
|
|
274
287
|
var _a;
|
|
@@ -279,6 +292,16 @@ export class TSLanguageWriter extends LanguageWriter {
|
|
|
279
292
|
writeConstant(constName, constType, constVal) {
|
|
280
293
|
this.print(`export const ${constName}: ${this.getNodeName(constType)}${constVal ? ' = ' + constVal : ''}`);
|
|
281
294
|
}
|
|
295
|
+
writeImports(moduleName, importedFeatures, aliases) {
|
|
296
|
+
if (importedFeatures.length !== aliases.length) {
|
|
297
|
+
throw new Error(`Inconsistent imports from ${moduleName}`);
|
|
298
|
+
}
|
|
299
|
+
const importNodes = [];
|
|
300
|
+
for (let i = 0; i < importedFeatures.length; i++) {
|
|
301
|
+
importNodes.push(importedFeatures[i] + (aliases[i] ? ` as ${aliases[i]}` : ``));
|
|
302
|
+
}
|
|
303
|
+
this.writeExpressionStatement(this.makeString(`import { ${importNodes.join(', ')} } from "${moduleName}"`));
|
|
304
|
+
}
|
|
282
305
|
writeDeclaration(name, signature, needReturn, needBracket, modifiers, generics) {
|
|
283
306
|
let prefix = !modifiers ? undefined : this.supportedModifiers
|
|
284
307
|
.filter(it => modifiers.includes(it))
|
|
@@ -9,7 +9,6 @@ export interface LibraryInterface extends ReferenceResolver {
|
|
|
9
9
|
get files(): idl.IDLFile[];
|
|
10
10
|
typeConvertor(param: string, type: idl.IDLType, isOptionalParam?: boolean): ArgConvertor;
|
|
11
11
|
declarationConvertor(param: string, type: idl.IDLReferenceType, declaration: idl.IDLEntry | undefined): ArgConvertor;
|
|
12
|
-
getInteropName(node: idl.IDLNode): string;
|
|
13
12
|
createTypeNameConvertor(language: Language): IdlNameConvertor;
|
|
14
13
|
createContinuationCallbackReference(continuationType: idl.IDLType): idl.IDLReferenceType;
|
|
15
14
|
getCurrentContext(): string | undefined;
|
|
@@ -17,7 +17,7 @@ import { IDLEntity, IDLKind, getExtAttribute, getVerbatimDts, hasExtAttribute, i
|
|
|
17
17
|
import { resolveSyntheticType, parseIDLFile } from "./deserialize";
|
|
18
18
|
import { Language } from "../Language";
|
|
19
19
|
import { warn } from "../util";
|
|
20
|
-
import { isInIdlize } from "../
|
|
20
|
+
import { isInIdlize } from "../idl";
|
|
21
21
|
export class CustomPrintVisitor {
|
|
22
22
|
constructor(resolver, language) {
|
|
23
23
|
this.resolver = resolver;
|
|
@@ -531,7 +531,7 @@ export function toIdlType(fileName, content) {
|
|
|
531
531
|
return deserializer.toIDLType(fileName, webidl2.parseType(content, fileName));
|
|
532
532
|
}
|
|
533
533
|
const DifferenceFound = new DiagnosticMessageGroup("error", "DifferenceFound", "Difference found");
|
|
534
|
-
const noCompare = new Set(["parent", "fileName", "nodeLocation", "nameLocation", "valueLocation", "typesValue"]);
|
|
534
|
+
const noCompare = new Set(["parent", "fileName", "nodeLocation", "nameLocation", "valueLocation", "typesValue", "text"]);
|
|
535
535
|
const canContainMoreCompare = new Set(["extendedAttributes", "typeParameters", "typeArguments"]);
|
|
536
536
|
function safeString(value) {
|
|
537
537
|
if (typeof value == "symbol") {
|
package/build/lib/src/idl.d.ts
CHANGED
|
@@ -435,5 +435,10 @@ export declare function extremumOfOrdinals(enumEntry: IDLEnum): {
|
|
|
435
435
|
low: number;
|
|
436
436
|
high: number;
|
|
437
437
|
};
|
|
438
|
+
export declare const PACKAGE_IDLIZE_INTERNAL = "idlize.internal";
|
|
439
|
+
export declare function isInIdlize(entry: IDLEntry | IDLFile): boolean;
|
|
440
|
+
export declare function isInIdlizeInterop(entry: IDLEntry | IDLFile): boolean;
|
|
441
|
+
export declare function isInIdlizeInternal(entry: IDLEntry | IDLFile): boolean;
|
|
442
|
+
export declare function isInIdlizeStdlib(entry: IDLEntry | IDLFile): boolean;
|
|
438
443
|
export {};
|
|
439
444
|
//# sourceMappingURL=idl.d.ts.map
|
package/build/lib/src/idl.js
CHANGED
|
@@ -482,6 +482,7 @@ export function getNamespacesPathFor(node) {
|
|
|
482
482
|
}
|
|
483
483
|
return result;
|
|
484
484
|
}
|
|
485
|
+
const nodesWithoutIDLFiles = new Set();
|
|
485
486
|
export function getFileFor(node) {
|
|
486
487
|
let iterator = node;
|
|
487
488
|
while (iterator) {
|
|
@@ -489,7 +490,11 @@ export function getFileFor(node) {
|
|
|
489
490
|
return iterator;
|
|
490
491
|
iterator = iterator.parent;
|
|
491
492
|
}
|
|
492
|
-
|
|
493
|
+
const name = getQualifiedName(node, "namespace.name");
|
|
494
|
+
if (!nodesWithoutIDLFiles.has(name)) {
|
|
495
|
+
console.warn(`Node ${name} does not have IDLFile in parents`);
|
|
496
|
+
nodesWithoutIDLFiles.add(name);
|
|
497
|
+
}
|
|
493
498
|
return undefined;
|
|
494
499
|
}
|
|
495
500
|
export function isEqualByQualifedName(a, b, pattern = "package.namespace.name") {
|
|
@@ -1364,4 +1369,17 @@ export function extremumOfOrdinals(enumEntry) {
|
|
|
1364
1369
|
});
|
|
1365
1370
|
return { low, high };
|
|
1366
1371
|
}
|
|
1372
|
+
export const PACKAGE_IDLIZE_INTERNAL = "idlize.internal";
|
|
1373
|
+
export function isInIdlize(entry) {
|
|
1374
|
+
return isInPackage(entry, "idlize");
|
|
1375
|
+
}
|
|
1376
|
+
export function isInIdlizeInterop(entry) {
|
|
1377
|
+
return isInPackage(entry, `${PACKAGE_IDLIZE_INTERNAL}.interop`);
|
|
1378
|
+
}
|
|
1379
|
+
export function isInIdlizeInternal(entry) {
|
|
1380
|
+
return isInPackage(entry, PACKAGE_IDLIZE_INTERNAL);
|
|
1381
|
+
}
|
|
1382
|
+
export function isInIdlizeStdlib(entry) {
|
|
1383
|
+
return isInPackage(entry, "idlize.stdlib");
|
|
1384
|
+
}
|
|
1367
1385
|
//# sourceMappingURL=idl.js.map
|