Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2947,6 +2947,16 @@ extension BridgeJSLink {
"\(method.name)\(renderTSSignatureCallback(method.parameters, method.returnType, method.effects));"
printer.write(methodSignature)
}

let sortedProperties = klass.properties.filter { !$0.isStatic }.sorted {
$0.name < $1.name
}
for property in sortedProperties {
let readonly = property.isReadonly ? "readonly " : ""
printer.write("\(readonly)\(property.name): \(property.type.tsType);")
}

printer.write("release(): void;")
}
printer.write("}")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ declare global {
class Converter {
constructor();
format(value: number): string;
release(): void;
}
}
namespace Networking {
namespace API {
class HTTPServer {
constructor();
call(method: Networking.API.MethodTag): void;
release(): void;
}
const MethodValues: {
readonly Get: 0;
Expand All @@ -55,6 +57,7 @@ declare global {
class TestServer {
constructor();
call(method: Networking.APIV2.Internal.SupportedMethodTag): void;
release(): void;
}
const SupportedMethodValues: {
readonly Get: 0;
Expand All @@ -77,6 +80,8 @@ declare global {
class Converter {
constructor();
toString(value: number): string;
precision: number;
release(): void;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ declare global {
class GlobalClass {
constructor();
greet(): string;
release(): void;
}
function globalFunction(): string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ declare global {
constructor();
addItem(item: Greeter): void;
getItems(): Greeter[];
release(): void;
}
}
namespace MyModule {
Expand All @@ -24,6 +25,7 @@ declare global {
class Converter {
constructor();
toString(value: number): string;
release(): void;
}
}
}
Expand All @@ -32,9 +34,11 @@ declare global {
class Greeter {
constructor(name: string);
greet(): string;
release(): void;
}
class UUID {
uuidString(): string;
release(): void;
}
}
}
Expand Down