delete protobuf stuff, and unused code
This commit is contained in:
parent
16d382db11
commit
7dd7baef34
132 changed files with 16 additions and 57708 deletions
|
|
@ -1,12 +1,6 @@
|
|||
import dev.adamko.gradle.pbandg.task.ProtobufCompileTask
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.NpmProject
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.RootPackageJsonTask
|
||||
|
||||
plugins {
|
||||
id("dev.adamko.factoriowebmap.archetype.base")
|
||||
kotlin("multiplatform")
|
||||
|
||||
id("dev.adamko.gradle.pbandg.pb-and-g")
|
||||
}
|
||||
|
||||
val projectId: String by project.extra
|
||||
|
|
@ -43,9 +37,6 @@ kotlin {
|
|||
|
||||
sourceSets {
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
implementation(npm("ts-proto", "1.83.3"))
|
||||
}
|
||||
}
|
||||
|
||||
val jsTest by getting {
|
||||
|
|
@ -69,86 +60,3 @@ kotlin {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
protobufLibrary("com.google.protobuf:protobuf-javalite:3.19.1")
|
||||
}
|
||||
|
||||
val rootPackageJson by rootProject.tasks.getting(RootPackageJsonTask::class)
|
||||
val nodePath: Directory by extra {
|
||||
val file = rootPackageJson.rootPackageJson.parentFile.normalize()
|
||||
logger.lifecycle("Kotlin/JS NODE_PATH: $file")
|
||||
project.layout.dir(provider { file }).get()
|
||||
}
|
||||
|
||||
val nodeModulesDir: Directory by extra {
|
||||
val file = nodePath.dir(NpmProject.NODE_MODULES)
|
||||
logger.lifecycle("Kotlin/JS NODE_MODULES: $file")
|
||||
file
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
val protobufJava by tasks.creating(ProtobufCompileTask::class) {
|
||||
description = "proto2java"
|
||||
protoFile.set(file("$projectDir/src/proto/FactorioServerLogRecord.proto"))
|
||||
|
||||
cliArgs.add("--java_out=lite:${project.mkdir("$temporaryDir/java").canonicalPath}")
|
||||
}
|
||||
val protobufKotlin by tasks.creating(ProtobufCompileTask::class) {
|
||||
description = "proto2kotlin"
|
||||
protoFile.set(file("$projectDir/src/proto/FactorioServerLogRecord.proto"))
|
||||
|
||||
cliArgs.add("--kotlin_out=lite:${project.mkdir("$temporaryDir/kotlin").canonicalPath}")
|
||||
}
|
||||
|
||||
|
||||
val ktProto by configurations.creating {
|
||||
isCanBeResolved = false
|
||||
isCanBeConsumed = true
|
||||
}
|
||||
|
||||
artifacts {
|
||||
add(ktProto.name, protobufJava.outputDir) {
|
||||
builtBy(protobufJava)
|
||||
}
|
||||
add(ktProto.name, protobufKotlin.outputDir) {
|
||||
builtBy(protobufKotlin)
|
||||
}
|
||||
}
|
||||
|
||||
val protobufTypescript by tasks.creating(ProtobufCompileTask::class) {
|
||||
description = "proto2typescript"
|
||||
|
||||
// linux:
|
||||
// cliArgs.add("--plugin=${rootProject.buildDir}/js/packages/factorio-web-map-factorio-events-data-model/node_modules/.bin/protoc-gen-ts_proto.cmd")
|
||||
// windows:
|
||||
cliArgs.add("--plugin=protoc-gen-ts_proto=${rootProject.buildDir}/js/packages/factorio-web-map-factorio-events-data-model/node_modules/.bin/protoc-gen-ts_proto.cmd")
|
||||
|
||||
cliArgs.add("--ts_proto_out=${project.mkdir("$temporaryDir/typescript").canonicalPath}")
|
||||
|
||||
cliArgs.addAll(
|
||||
"--ts_proto_opt=useOptionals=true",
|
||||
"--ts_proto_opt=outputServices=false",
|
||||
"--ts_proto_opt=outputJsonMethods=false",
|
||||
// "--ts_proto_opt=outputEncodeMethods=false",
|
||||
"--ts_proto_opt=forceLong=string",
|
||||
"--ts_proto_opt=forceLong=number",
|
||||
"--ts_proto_opt=esModuleInterop=true",
|
||||
"--ts_proto_opt=exportCommonSymbols=false",
|
||||
// "--proto_path=${rootProject.rootDir}",
|
||||
)
|
||||
|
||||
protoFile.set(file("$projectDir/src/proto/FactorioServerLogRecord.proto"))
|
||||
}
|
||||
|
||||
val tsProto by configurations.creating {
|
||||
isCanBeResolved = false
|
||||
isCanBeConsumed = true
|
||||
}
|
||||
artifacts {
|
||||
add(tsProto.name, protobufTypescript.outputDir) {
|
||||
builtBy(protobufTypescript)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
syntax = "proto3";
|
||||
|
||||
//option optimize_for = LITE_RUNTIME;
|
||||
option java_multiple_files = true;
|
||||
|
||||
package dev.adamko.factorioevents;
|
||||
|
||||
//import "google/protobuf/any.proto";
|
||||
//import "google/protobuf/timestamp.proto";
|
||||
|
||||
message FactorioServerLogRecord {
|
||||
string mod_version = 1;
|
||||
uint32 tick = 2;
|
||||
string event_type = 3;
|
||||
FactorioLuaObject data = 4;
|
||||
|
||||
}
|
||||
|
||||
message FactorioLuaObject {
|
||||
string object_name = 1;
|
||||
oneof data {
|
||||
LuaControl lua_control = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// https://lua-api.factorio.com/next/LuaControl.html
|
||||
message LuaControl {
|
||||
bool is_player = 2;
|
||||
uint32 surface_index = 3;
|
||||
Position position = 4;
|
||||
uint32 force_index = 5;
|
||||
|
||||
oneof subtype {
|
||||
LuaPlayer player = 10;
|
||||
LuaEntity entity = 11;
|
||||
}
|
||||
}
|
||||
|
||||
// https://lua-api.factorio.com/next/LuaPlayer.html
|
||||
message LuaPlayer {
|
||||
uint32 index = 1; // unique ID
|
||||
string name = 2;
|
||||
repeated int32 data = 4 [packed = true];
|
||||
|
||||
Colour colour = 8;
|
||||
|
||||
bool is_connected = 10;
|
||||
bool is_admin = 11;
|
||||
|
||||
uint32 afk_time_ticks = 100;
|
||||
uint32 online_time_ticks = 101;
|
||||
uint32 last_online_ticks = 102;
|
||||
}
|
||||
|
||||
// https://lua-api.factorio.com/next/LuaEntity.html
|
||||
message LuaEntity {
|
||||
optional uint32 unit_number = 1; // (optional) unique ID
|
||||
string name = 2;
|
||||
string type = 3;
|
||||
string status = 4; // https://lua-api.factorio.com/next/defines.html#defines.entity_status
|
||||
|
||||
bool is_active = 8;
|
||||
bool is_moving = 9;
|
||||
|
||||
optional uint32 player_index = 50; // (optional) The player connected to this character or nil if none.
|
||||
optional uint32 last_user_index = 51; // (optional) The last player that changed any setting on this entity.
|
||||
|
||||
Colour colour = 100; // (optional)
|
||||
}
|
||||
|
||||
message LuaSurface {
|
||||
uint32 index = 1; // unique ID
|
||||
string name = 2;
|
||||
float daytime = 3;
|
||||
}
|
||||
|
||||
message LuaForce {
|
||||
uint32 index = 1; // unique ID
|
||||
string force_name = 2;
|
||||
|
||||
repeated uint32 player_ids = 100 [packed = true];
|
||||
}
|
||||
|
||||
message Position {
|
||||
int32 x = 1;
|
||||
int32 y = 2;
|
||||
}
|
||||
|
||||
message Colour {
|
||||
float red = 1;
|
||||
float green = 2;
|
||||
float blue = 3;
|
||||
float alpha = 4;
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
package dev.adamko.factorioevents.model
|
||||
|
||||
import kotlin.js.JsExport
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
//expect sealed interface JsonPrimitive {
|
||||
// value class JsonString(val string: String) : JsonPrimitive
|
||||
// value class JsonNumber(val number: Number) : JsonPrimitive
|
||||
// value class JsonBoolean(val boolean: Boolean) : JsonPrimitive
|
||||
//}
|
||||
|
||||
sealed interface JsonPrimitive {
|
||||
@JvmInline
|
||||
value class JsonString(val string: String) : JsonPrimitive
|
||||
@JvmInline
|
||||
value class JsonNumber(val number: Number) : JsonPrimitive
|
||||
@JvmInline
|
||||
value class JsonBoolean(val boolean: Boolean) : JsonPrimitive
|
||||
}
|
||||
|
||||
class JsonArray<T : JsonPrimitive?>(
|
||||
private val list: MutableList<T> = mutableListOf()
|
||||
) : MutableList<T> by list
|
||||
|
||||
|
||||
sealed interface JsonTableValue {
|
||||
@JvmInline
|
||||
value class JsonPrimitiveTV(val primitive: JsonPrimitive) : JsonTableValue
|
||||
@JvmInline
|
||||
value class JsonArrayTV<T : JsonPrimitive?>(val array: JsonArray<T>) : JsonTableValue
|
||||
@JvmInline
|
||||
value class JsonTableTV<T : JsonTable?>(val array: JsonTable) : JsonTableValue
|
||||
}
|
||||
|
||||
//expect class JsonNumber() : JsonPrimitiveType
|
||||
|
||||
//expect class JsonArray<T : JsonPrimitive?>
|
||||
|
||||
//expect open class JsonTable<K : JsonPrimitive.JsonString, V : JsonTableValue?>
|
||||
|
||||
open class JsonTable(
|
||||
protected val map: MutableMap<JsonPrimitive.JsonString, JsonTableValue?> = mutableMapOf()
|
||||
) : MutableMap<JsonPrimitive.JsonString, JsonTableValue?> by map {
|
||||
|
||||
inline fun <reified T> get2(key: String): T? {
|
||||
|
||||
val jKey = JsonPrimitive.JsonString(key)
|
||||
|
||||
return when {
|
||||
T::class is Number -> ((get(jKey) as? JsonTableValue.JsonPrimitiveTV)?.primitive as? JsonPrimitive.JsonNumber)?.number as? T
|
||||
else -> return get(jKey) as? T
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//@JsExport
|
||||
class FactorioEvent : JsonTable() {
|
||||
val tick: UInt?
|
||||
get() = get2("tick")
|
||||
// set(value) = map.put("tick", value)
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package dev.adamko.factorioevents.model
|
||||
|
||||
|
||||
//actual sealed interface JsonPrimitive {
|
||||
// actual value class JsonString(val string: String) : JsonPrimitive
|
||||
// actual value class JsonNumber(val number: Number) : JsonPrimitive
|
||||
// actual value class JsonBoolean(val boolean: Boolean) : JsonPrimitive
|
||||
//}
|
||||
|
||||
//actual class JsonArray<T : JsonPrimitive?>(
|
||||
// private val list: MutableList<T> = mutableListOf()
|
||||
//) : MutableList<T> by list
|
||||
|
||||
//actual sealed interface JsonTableValue {
|
||||
// actual value class JsonPrimitiveTV(val primitive: JsonPrimitive) : JsonTableValue
|
||||
// actual value class JsonArrayTV<T : JsonPrimitive?>(val array: JsonArray<T>) : JsonTableValue
|
||||
//}
|
||||
|
||||
|
||||
//actual open class JsonTable<K : JsonPrimitive.JsonString, V: JsonTableValue?>(
|
||||
// private val map: MutableMap<K, V> = mutableMapOf()
|
||||
//) : MutableMap<K, V> by map
|
||||
|
||||
|
||||
fun printMap() {
|
||||
val f = JsonPrimitive.JsonString("test")
|
||||
|
||||
println(f.string)
|
||||
println(f)
|
||||
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
interface Identifiable<T> {
|
||||
val id: T
|
||||
}
|
||||
|
||||
|
||||
interface IndexedModel {
|
||||
val index: UInt
|
||||
}
|
||||
|
||||
interface NamedModel {
|
||||
val name: String
|
||||
}
|
||||
|
||||
|
||||
data class SurfaceModel(
|
||||
override val name: String,
|
||||
override val index: UInt,
|
||||
val daytime: Float,
|
||||
val darkness: Float,
|
||||
val wind_speed: Double,
|
||||
) : IndexedModel, NamedModel
|
||||
|
||||
|
||||
/** Player/Entity shared props */
|
||||
interface ControlModel {
|
||||
val driving: Boolean
|
||||
val forces: List<ForceModel>
|
||||
}
|
||||
|
||||
|
||||
//data class PlayerModel(
|
||||
// val index: UInt,
|
||||
// val characters: List<EntityModel>
|
||||
//) : Identifiable<UInt> {
|
||||
// override val id: UInt = index
|
||||
//}
|
||||
|
||||
//data class EntityModel(
|
||||
// val unit_number: Int,
|
||||
// override val name: String,
|
||||
// val type: String,
|
||||
// val active: Boolean,
|
||||
// val minable: Boolean,
|
||||
// val health: Boolean,
|
||||
// val speed: Float, override val driving: Boolean,
|
||||
//) : ControlModel, NamedModel
|
||||
|
||||
|
||||
data class ForceModel(
|
||||
val index: UInt,
|
||||
override val name: String,
|
||||
val research_progress: Double,
|
||||
) : Identifiable<UInt>, NamedModel {
|
||||
override val id: UInt = index
|
||||
}
|
||||
|
|
@ -16,66 +16,6 @@ node {
|
|||
nodeProjectDir.set(tsSrcDir)
|
||||
}
|
||||
|
||||
val tsProto: Configuration by configurations.creating {
|
||||
isCanBeConsumed = false
|
||||
isCanBeResolved = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
tsProto(projects.modules.factorioEventsDataModel.dependencyProject.configurations.getByName("tsProto"))
|
||||
}
|
||||
|
||||
val tsProtoFetch by tasks.creating(Sync::class) {
|
||||
group = project.name
|
||||
|
||||
dependsOn(projects.modules.factorioEventsDataModel.dependencyProject.tasks.named("protobufTypescript"))
|
||||
|
||||
val genSrcDir = projects
|
||||
.modules
|
||||
.factorioEventsDataModel
|
||||
.dependencyProject
|
||||
.layout
|
||||
.buildDirectory
|
||||
.dir("pbAndG/generated-sources/typescript")
|
||||
|
||||
val targetDir = "$projectDir/src/main/typescript/proto"
|
||||
|
||||
inputs.dir(genSrcDir)
|
||||
|
||||
from(genSrcDir)
|
||||
into(targetDir)
|
||||
|
||||
// doLast {
|
||||
//
|
||||
// fileTree(targetDir).forEach {
|
||||
// var text = it.readText()
|
||||
//
|
||||
// text = text.replace(
|
||||
// Regex(
|
||||
// """if \(_m0\.util\.Long !== Long\)\s*\{\s*_m0\.util\.Long = Long as any;\s*_m0\.configure\(\);\s*\}"""
|
||||
// ),
|
||||
// ""
|
||||
// )
|
||||
//
|
||||
// text = text.replace(
|
||||
// Regex("""import Long from "long";"""),
|
||||
// ""
|
||||
// )
|
||||
//
|
||||
// text = text.replace(
|
||||
// Regex("""import _m0 from "protobufjs\/minimal";"""),
|
||||
// ""
|
||||
// )
|
||||
//
|
||||
// it.writeText(text)
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
tasks.assemble { dependsOn(tsProtoFetch) }
|
||||
|
||||
|
||||
val tstlTask = tasks.register<NpmTask>("typescriptToLua") {
|
||||
description = "Convert Typescript To Lua"
|
||||
group = projectId
|
||||
|
|
@ -86,7 +26,7 @@ val tstlTask = tasks.register<NpmTask>("typescriptToLua") {
|
|||
|
||||
npmCommand.set(listOf("run", "build"))
|
||||
|
||||
inputs.dir(node.nodeProjectDir)
|
||||
inputs.dir(project.node.nodeProjectDir)
|
||||
.skipWhenEmpty()
|
||||
.withPropertyName("sourceFiles")
|
||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
|
|
@ -124,20 +64,18 @@ idea {
|
|||
}
|
||||
|
||||
|
||||
//val typescriptSrc =
|
||||
// project.objects.sourceDirectorySet("typescript", "typescript").apply {
|
||||
// srcDir(
|
||||
// layout.projectDirectory.dir("src/main/typescript")
|
||||
// )
|
||||
// destinationDirectory.set(
|
||||
// modBuildDir.dir("typescriptToLua")
|
||||
// )
|
||||
// compiledBy(tstlTask) {
|
||||
// project.objects.directoryProperty().apply {
|
||||
// set( modBuildDir.dir("typescriptToLua"))
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
val typescriptSrcSet =
|
||||
project.objects.sourceDirectorySet("typescript", "typescript").apply {
|
||||
srcDir(mkdir("$projectDir/src/main/typescript"))
|
||||
|
||||
destinationDirectory.set(modBuildDir.dir("typescriptToLua").asFile)
|
||||
compiledBy(tstlTask) {
|
||||
|
||||
project.objects.directoryProperty().apply {
|
||||
set(modBuildDir.dir("typescriptToLua"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val modPackageTask = tasks.register<Zip>("packageMod") {
|
||||
description = "Package mod files into ZIP"
|
||||
|
|
|
|||
153
modules/mod/src/main/typescript/package-lock.json
generated
153
modules/mod/src/main/typescript/package-lock.json
generated
|
|
@ -4,85 +4,11 @@
|
|||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@protobufjs/aspromise": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
||||
"integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78="
|
||||
},
|
||||
"@protobufjs/base64": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
||||
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="
|
||||
},
|
||||
"@protobufjs/codegen": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
||||
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg=="
|
||||
},
|
||||
"@protobufjs/eventemitter": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
||||
"integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A="
|
||||
},
|
||||
"@protobufjs/fetch": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
||||
"integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=",
|
||||
"requires": {
|
||||
"@protobufjs/aspromise": "^1.1.1",
|
||||
"@protobufjs/inquire": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"@protobufjs/float": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
||||
"integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E="
|
||||
},
|
||||
"@protobufjs/inquire": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
||||
"integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik="
|
||||
},
|
||||
"@protobufjs/path": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
||||
"integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0="
|
||||
},
|
||||
"@protobufjs/pool": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
||||
"integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q="
|
||||
},
|
||||
"@protobufjs/utf8": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
||||
"integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA="
|
||||
},
|
||||
"@types/long": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
|
||||
"integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w=="
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "12.20.33",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.33.tgz",
|
||||
"integrity": "sha512-5XmYX2GECSa+CxMYaFsr2mrql71Q4EvHjKS+ox/SiwSdaASMoBIWE6UmZqFO+VX1jIcsYLStI4FFoB6V7FeIYw=="
|
||||
},
|
||||
"@types/object-hash": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz",
|
||||
"integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA=="
|
||||
},
|
||||
"@types/prettier": {
|
||||
"version": "1.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-1.19.1.tgz",
|
||||
"integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ=="
|
||||
},
|
||||
"dataloader": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz",
|
||||
"integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw=="
|
||||
},
|
||||
"enhanced-resolve": {
|
||||
"version": "5.8.3",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz",
|
||||
|
|
@ -118,63 +44,16 @@
|
|||
"has": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"long": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
|
||||
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
||||
},
|
||||
"lua-types": {
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/lua-types/-/lua-types-2.11.0.tgz",
|
||||
"integrity": "sha512-J/8qHrOjkZuPBDhnuAg0DWoaJEImqXNzgEnUigCTVrSVCcchM5Y5zpcI3aWAZPhuZlb0QKC/f3nc7VGmZmBg7w=="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
|
||||
"integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA=="
|
||||
},
|
||||
"protobufjs": {
|
||||
"version": "6.11.2",
|
||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz",
|
||||
"integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==",
|
||||
"requires": {
|
||||
"@protobufjs/aspromise": "^1.1.2",
|
||||
"@protobufjs/base64": "^1.1.2",
|
||||
"@protobufjs/codegen": "^2.0.4",
|
||||
"@protobufjs/eventemitter": "^1.1.0",
|
||||
"@protobufjs/fetch": "^1.1.0",
|
||||
"@protobufjs/float": "^1.0.2",
|
||||
"@protobufjs/inquire": "^1.1.0",
|
||||
"@protobufjs/path": "^1.1.2",
|
||||
"@protobufjs/pool": "^1.1.0",
|
||||
"@protobufjs/utf8": "^1.1.0",
|
||||
"@types/long": "^4.0.1",
|
||||
"@types/node": ">=13.7.0",
|
||||
"long": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "16.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz",
|
||||
"integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.20.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
|
||||
|
|
@ -194,38 +73,6 @@
|
|||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
||||
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="
|
||||
},
|
||||
"ts-poet": {
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-4.6.1.tgz",
|
||||
"integrity": "sha512-DXJ+mBJIDp+jiaUgB4N5I/sczHHDU2FWacdbDNVAVS4Mh4hb7ckpvUWVW7m7/nAOcjR0r4Wt+7AoO7FeJKExfA==",
|
||||
"requires": {
|
||||
"@types/prettier": "^1.19.0",
|
||||
"lodash": "^4.17.15",
|
||||
"prettier": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"ts-proto": {
|
||||
"version": "1.83.3",
|
||||
"resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.83.3.tgz",
|
||||
"integrity": "sha512-r6MKFjoc4Og2kB4cNJ/bddLebdIwhouG5plu0Rry1jJMEqp2GKA7AE4FrR/FnTCIGbNPYP4622lBqckZd7UHcQ==",
|
||||
"requires": {
|
||||
"@types/object-hash": "^1.3.0",
|
||||
"dataloader": "^1.4.0",
|
||||
"object-hash": "^1.3.1",
|
||||
"protobufjs": "^6.8.8",
|
||||
"ts-poet": "^4.5.0",
|
||||
"ts-proto-descriptors": "^1.2.1"
|
||||
}
|
||||
},
|
||||
"ts-proto-descriptors": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.3.1.tgz",
|
||||
"integrity": "sha512-Cybb3fqceMwA6JzHdC32dIo8eVGVmXrM6TWhdk1XQVVHT/6OQqk0ioyX1dIdu3rCIBhRmWUhUE4HsyK+olmgMw==",
|
||||
"requires": {
|
||||
"long": "^4.0.0",
|
||||
"protobufjs": "^6.8.8"
|
||||
}
|
||||
},
|
||||
"typed-factorio": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/typed-factorio/-/typed-factorio-0.8.0.tgz",
|
||||
|
|
|
|||
|
|
@ -14,25 +14,9 @@
|
|||
"lua-types": "^2.11.0",
|
||||
"@types/node": "^12.0.8",
|
||||
"typescript-to-lua": "1.0.1",
|
||||
"typed-factorio": "0.8.0",
|
||||
"ts-proto": "1.83.3"
|
||||
"typed-factorio": "0.8.0"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"optionalDependencies": {},
|
||||
"bundledDependencies": [],
|
||||
"//": {
|
||||
"typescript-json-schema": "0.51.0",
|
||||
"typescript": "4.4.3",
|
||||
"@types/node": "^13.7.7",
|
||||
"kafkajs": "1.15.0",
|
||||
"lua-types": "^2.11.0",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"webpack": "5.38.1",
|
||||
"webpack-cli": "4.7.1",
|
||||
"format-util": "1.0.5",
|
||||
"source-map-loader": "3.0.0",
|
||||
"css-loader": "5.2.6",
|
||||
"style-loader": "2.0.0"
|
||||
}
|
||||
"bundledDependencies": []
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,907 +0,0 @@
|
|||
/* eslint-disable */
|
||||
import Long from "long";
|
||||
import _m0 from "protobufjs/minimal";
|
||||
|
||||
export interface FactorioServerLogRecord {
|
||||
modVersion: string;
|
||||
tick: number;
|
||||
eventType: string;
|
||||
data?: FactorioLuaObject;
|
||||
}
|
||||
|
||||
export interface FactorioLuaObject {
|
||||
objectName: string;
|
||||
luaControl?: LuaControl | undefined;
|
||||
}
|
||||
|
||||
/** https://lua-api.factorio.com/next/LuaControl.html */
|
||||
export interface LuaControl {
|
||||
isPlayer: boolean;
|
||||
surfaceIndex: number;
|
||||
position?: Position;
|
||||
forceIndex: number;
|
||||
player?: LuaPlayer | undefined;
|
||||
entity?: LuaEntity | undefined;
|
||||
}
|
||||
|
||||
/** https://lua-api.factorio.com/next/LuaPlayer.html */
|
||||
export interface LuaPlayer {
|
||||
/** unique ID */
|
||||
index: number;
|
||||
name: string;
|
||||
data: number[];
|
||||
colour?: Colour;
|
||||
isConnected: boolean;
|
||||
isAdmin: boolean;
|
||||
afkTimeTicks: number;
|
||||
onlineTimeTicks: number;
|
||||
lastOnlineTicks: number;
|
||||
}
|
||||
|
||||
/** https://lua-api.factorio.com/next/LuaEntity.html */
|
||||
export interface LuaEntity {
|
||||
/** (optional) unique ID */
|
||||
unitNumber?: number | undefined;
|
||||
name: string;
|
||||
type: string;
|
||||
/** https://lua-api.factorio.com/next/defines.html#defines.entity_status */
|
||||
status: string;
|
||||
isActive: boolean;
|
||||
isMoving: boolean;
|
||||
/** (optional) The player connected to this character or nil if none. */
|
||||
playerIndex?: number | undefined;
|
||||
/** (optional) The last player that changed any setting on this entity. */
|
||||
lastUserIndex?: number | undefined;
|
||||
/** (optional) */
|
||||
colour?: Colour;
|
||||
}
|
||||
|
||||
export interface LuaSurface {
|
||||
/** unique ID */
|
||||
index: number;
|
||||
name: string;
|
||||
daytime: number;
|
||||
}
|
||||
|
||||
export interface LuaForce {
|
||||
/** unique ID */
|
||||
index: number;
|
||||
forceName: string;
|
||||
playerIds: number[];
|
||||
}
|
||||
|
||||
export interface Position {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export interface Colour {
|
||||
red: number;
|
||||
green: number;
|
||||
blue: number;
|
||||
alpha: number;
|
||||
}
|
||||
|
||||
const baseFactorioServerLogRecord: object = {
|
||||
modVersion: "",
|
||||
tick: 0,
|
||||
eventType: "",
|
||||
};
|
||||
|
||||
export const FactorioServerLogRecord = {
|
||||
encode(
|
||||
message: FactorioServerLogRecord,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.modVersion !== "") {
|
||||
writer.uint32(10).string(message.modVersion);
|
||||
}
|
||||
if (message.tick !== 0) {
|
||||
writer.uint32(16).uint32(message.tick);
|
||||
}
|
||||
if (message.eventType !== "") {
|
||||
writer.uint32(26).string(message.eventType);
|
||||
}
|
||||
if (message.data !== undefined) {
|
||||
FactorioLuaObject.encode(message.data, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): FactorioServerLogRecord {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = {
|
||||
...baseFactorioServerLogRecord,
|
||||
} as FactorioServerLogRecord;
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.modVersion = reader.string();
|
||||
break;
|
||||
case 2:
|
||||
message.tick = reader.uint32();
|
||||
break;
|
||||
case 3:
|
||||
message.eventType = reader.string();
|
||||
break;
|
||||
case 4:
|
||||
message.data = FactorioLuaObject.decode(reader, reader.uint32());
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
object: DeepPartial<FactorioServerLogRecord>
|
||||
): FactorioServerLogRecord {
|
||||
const message = {
|
||||
...baseFactorioServerLogRecord,
|
||||
} as FactorioServerLogRecord;
|
||||
if (object.modVersion !== undefined && object.modVersion !== null) {
|
||||
message.modVersion = object.modVersion;
|
||||
} else {
|
||||
message.modVersion = "";
|
||||
}
|
||||
if (object.tick !== undefined && object.tick !== null) {
|
||||
message.tick = object.tick;
|
||||
} else {
|
||||
message.tick = 0;
|
||||
}
|
||||
if (object.eventType !== undefined && object.eventType !== null) {
|
||||
message.eventType = object.eventType;
|
||||
} else {
|
||||
message.eventType = "";
|
||||
}
|
||||
if (object.data !== undefined && object.data !== null) {
|
||||
message.data = FactorioLuaObject.fromPartial(object.data);
|
||||
} else {
|
||||
message.data = undefined;
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseFactorioLuaObject: object = { objectName: "" };
|
||||
|
||||
export const FactorioLuaObject = {
|
||||
encode(
|
||||
message: FactorioLuaObject,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.objectName !== "") {
|
||||
writer.uint32(10).string(message.objectName);
|
||||
}
|
||||
if (message.luaControl !== undefined) {
|
||||
LuaControl.encode(message.luaControl, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): FactorioLuaObject {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...baseFactorioLuaObject } as FactorioLuaObject;
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.objectName = reader.string();
|
||||
break;
|
||||
case 2:
|
||||
message.luaControl = LuaControl.decode(reader, reader.uint32());
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<FactorioLuaObject>): FactorioLuaObject {
|
||||
const message = { ...baseFactorioLuaObject } as FactorioLuaObject;
|
||||
if (object.objectName !== undefined && object.objectName !== null) {
|
||||
message.objectName = object.objectName;
|
||||
} else {
|
||||
message.objectName = "";
|
||||
}
|
||||
if (object.luaControl !== undefined && object.luaControl !== null) {
|
||||
message.luaControl = LuaControl.fromPartial(object.luaControl);
|
||||
} else {
|
||||
message.luaControl = undefined;
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseLuaControl: object = {
|
||||
isPlayer: false,
|
||||
surfaceIndex: 0,
|
||||
forceIndex: 0,
|
||||
};
|
||||
|
||||
export const LuaControl = {
|
||||
encode(
|
||||
message: LuaControl,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.isPlayer === true) {
|
||||
writer.uint32(16).bool(message.isPlayer);
|
||||
}
|
||||
if (message.surfaceIndex !== 0) {
|
||||
writer.uint32(24).uint32(message.surfaceIndex);
|
||||
}
|
||||
if (message.position !== undefined) {
|
||||
Position.encode(message.position, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
if (message.forceIndex !== 0) {
|
||||
writer.uint32(40).uint32(message.forceIndex);
|
||||
}
|
||||
if (message.player !== undefined) {
|
||||
LuaPlayer.encode(message.player, writer.uint32(82).fork()).ldelim();
|
||||
}
|
||||
if (message.entity !== undefined) {
|
||||
LuaEntity.encode(message.entity, writer.uint32(90).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): LuaControl {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...baseLuaControl } as LuaControl;
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 2:
|
||||
message.isPlayer = reader.bool();
|
||||
break;
|
||||
case 3:
|
||||
message.surfaceIndex = reader.uint32();
|
||||
break;
|
||||
case 4:
|
||||
message.position = Position.decode(reader, reader.uint32());
|
||||
break;
|
||||
case 5:
|
||||
message.forceIndex = reader.uint32();
|
||||
break;
|
||||
case 10:
|
||||
message.player = LuaPlayer.decode(reader, reader.uint32());
|
||||
break;
|
||||
case 11:
|
||||
message.entity = LuaEntity.decode(reader, reader.uint32());
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<LuaControl>): LuaControl {
|
||||
const message = { ...baseLuaControl } as LuaControl;
|
||||
if (object.isPlayer !== undefined && object.isPlayer !== null) {
|
||||
message.isPlayer = object.isPlayer;
|
||||
} else {
|
||||
message.isPlayer = false;
|
||||
}
|
||||
if (object.surfaceIndex !== undefined && object.surfaceIndex !== null) {
|
||||
message.surfaceIndex = object.surfaceIndex;
|
||||
} else {
|
||||
message.surfaceIndex = 0;
|
||||
}
|
||||
if (object.position !== undefined && object.position !== null) {
|
||||
message.position = Position.fromPartial(object.position);
|
||||
} else {
|
||||
message.position = undefined;
|
||||
}
|
||||
if (object.forceIndex !== undefined && object.forceIndex !== null) {
|
||||
message.forceIndex = object.forceIndex;
|
||||
} else {
|
||||
message.forceIndex = 0;
|
||||
}
|
||||
if (object.player !== undefined && object.player !== null) {
|
||||
message.player = LuaPlayer.fromPartial(object.player);
|
||||
} else {
|
||||
message.player = undefined;
|
||||
}
|
||||
if (object.entity !== undefined && object.entity !== null) {
|
||||
message.entity = LuaEntity.fromPartial(object.entity);
|
||||
} else {
|
||||
message.entity = undefined;
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseLuaPlayer: object = {
|
||||
index: 0,
|
||||
name: "",
|
||||
data: 0,
|
||||
isConnected: false,
|
||||
isAdmin: false,
|
||||
afkTimeTicks: 0,
|
||||
onlineTimeTicks: 0,
|
||||
lastOnlineTicks: 0,
|
||||
};
|
||||
|
||||
export const LuaPlayer = {
|
||||
encode(
|
||||
message: LuaPlayer,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.index !== 0) {
|
||||
writer.uint32(8).uint32(message.index);
|
||||
}
|
||||
if (message.name !== "") {
|
||||
writer.uint32(18).string(message.name);
|
||||
}
|
||||
writer.uint32(34).fork();
|
||||
for (const v of message.data) {
|
||||
writer.int32(v);
|
||||
}
|
||||
writer.ldelim();
|
||||
if (message.colour !== undefined) {
|
||||
Colour.encode(message.colour, writer.uint32(66).fork()).ldelim();
|
||||
}
|
||||
if (message.isConnected === true) {
|
||||
writer.uint32(80).bool(message.isConnected);
|
||||
}
|
||||
if (message.isAdmin === true) {
|
||||
writer.uint32(88).bool(message.isAdmin);
|
||||
}
|
||||
if (message.afkTimeTicks !== 0) {
|
||||
writer.uint32(800).uint32(message.afkTimeTicks);
|
||||
}
|
||||
if (message.onlineTimeTicks !== 0) {
|
||||
writer.uint32(808).uint32(message.onlineTimeTicks);
|
||||
}
|
||||
if (message.lastOnlineTicks !== 0) {
|
||||
writer.uint32(816).uint32(message.lastOnlineTicks);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): LuaPlayer {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...baseLuaPlayer } as LuaPlayer;
|
||||
message.data = [];
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.index = reader.uint32();
|
||||
break;
|
||||
case 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case 4:
|
||||
if ((tag & 7) === 2) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.data.push(reader.int32());
|
||||
}
|
||||
} else {
|
||||
message.data.push(reader.int32());
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
message.colour = Colour.decode(reader, reader.uint32());
|
||||
break;
|
||||
case 10:
|
||||
message.isConnected = reader.bool();
|
||||
break;
|
||||
case 11:
|
||||
message.isAdmin = reader.bool();
|
||||
break;
|
||||
case 100:
|
||||
message.afkTimeTicks = reader.uint32();
|
||||
break;
|
||||
case 101:
|
||||
message.onlineTimeTicks = reader.uint32();
|
||||
break;
|
||||
case 102:
|
||||
message.lastOnlineTicks = reader.uint32();
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<LuaPlayer>): LuaPlayer {
|
||||
const message = { ...baseLuaPlayer } as LuaPlayer;
|
||||
message.data = [];
|
||||
if (object.index !== undefined && object.index !== null) {
|
||||
message.index = object.index;
|
||||
} else {
|
||||
message.index = 0;
|
||||
}
|
||||
if (object.name !== undefined && object.name !== null) {
|
||||
message.name = object.name;
|
||||
} else {
|
||||
message.name = "";
|
||||
}
|
||||
if (object.data !== undefined && object.data !== null) {
|
||||
for (const e of object.data) {
|
||||
message.data.push(e);
|
||||
}
|
||||
}
|
||||
if (object.colour !== undefined && object.colour !== null) {
|
||||
message.colour = Colour.fromPartial(object.colour);
|
||||
} else {
|
||||
message.colour = undefined;
|
||||
}
|
||||
if (object.isConnected !== undefined && object.isConnected !== null) {
|
||||
message.isConnected = object.isConnected;
|
||||
} else {
|
||||
message.isConnected = false;
|
||||
}
|
||||
if (object.isAdmin !== undefined && object.isAdmin !== null) {
|
||||
message.isAdmin = object.isAdmin;
|
||||
} else {
|
||||
message.isAdmin = false;
|
||||
}
|
||||
if (object.afkTimeTicks !== undefined && object.afkTimeTicks !== null) {
|
||||
message.afkTimeTicks = object.afkTimeTicks;
|
||||
} else {
|
||||
message.afkTimeTicks = 0;
|
||||
}
|
||||
if (
|
||||
object.onlineTimeTicks !== undefined &&
|
||||
object.onlineTimeTicks !== null
|
||||
) {
|
||||
message.onlineTimeTicks = object.onlineTimeTicks;
|
||||
} else {
|
||||
message.onlineTimeTicks = 0;
|
||||
}
|
||||
if (
|
||||
object.lastOnlineTicks !== undefined &&
|
||||
object.lastOnlineTicks !== null
|
||||
) {
|
||||
message.lastOnlineTicks = object.lastOnlineTicks;
|
||||
} else {
|
||||
message.lastOnlineTicks = 0;
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseLuaEntity: object = {
|
||||
name: "",
|
||||
type: "",
|
||||
status: "",
|
||||
isActive: false,
|
||||
isMoving: false,
|
||||
};
|
||||
|
||||
export const LuaEntity = {
|
||||
encode(
|
||||
message: LuaEntity,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.unitNumber !== undefined) {
|
||||
writer.uint32(8).uint32(message.unitNumber);
|
||||
}
|
||||
if (message.name !== "") {
|
||||
writer.uint32(18).string(message.name);
|
||||
}
|
||||
if (message.type !== "") {
|
||||
writer.uint32(26).string(message.type);
|
||||
}
|
||||
if (message.status !== "") {
|
||||
writer.uint32(34).string(message.status);
|
||||
}
|
||||
if (message.isActive === true) {
|
||||
writer.uint32(64).bool(message.isActive);
|
||||
}
|
||||
if (message.isMoving === true) {
|
||||
writer.uint32(72).bool(message.isMoving);
|
||||
}
|
||||
if (message.playerIndex !== undefined) {
|
||||
writer.uint32(400).uint32(message.playerIndex);
|
||||
}
|
||||
if (message.lastUserIndex !== undefined) {
|
||||
writer.uint32(408).uint32(message.lastUserIndex);
|
||||
}
|
||||
if (message.colour !== undefined) {
|
||||
Colour.encode(message.colour, writer.uint32(802).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): LuaEntity {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...baseLuaEntity } as LuaEntity;
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.unitNumber = reader.uint32();
|
||||
break;
|
||||
case 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case 3:
|
||||
message.type = reader.string();
|
||||
break;
|
||||
case 4:
|
||||
message.status = reader.string();
|
||||
break;
|
||||
case 8:
|
||||
message.isActive = reader.bool();
|
||||
break;
|
||||
case 9:
|
||||
message.isMoving = reader.bool();
|
||||
break;
|
||||
case 50:
|
||||
message.playerIndex = reader.uint32();
|
||||
break;
|
||||
case 51:
|
||||
message.lastUserIndex = reader.uint32();
|
||||
break;
|
||||
case 100:
|
||||
message.colour = Colour.decode(reader, reader.uint32());
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<LuaEntity>): LuaEntity {
|
||||
const message = { ...baseLuaEntity } as LuaEntity;
|
||||
if (object.unitNumber !== undefined && object.unitNumber !== null) {
|
||||
message.unitNumber = object.unitNumber;
|
||||
} else {
|
||||
message.unitNumber = undefined;
|
||||
}
|
||||
if (object.name !== undefined && object.name !== null) {
|
||||
message.name = object.name;
|
||||
} else {
|
||||
message.name = "";
|
||||
}
|
||||
if (object.type !== undefined && object.type !== null) {
|
||||
message.type = object.type;
|
||||
} else {
|
||||
message.type = "";
|
||||
}
|
||||
if (object.status !== undefined && object.status !== null) {
|
||||
message.status = object.status;
|
||||
} else {
|
||||
message.status = "";
|
||||
}
|
||||
if (object.isActive !== undefined && object.isActive !== null) {
|
||||
message.isActive = object.isActive;
|
||||
} else {
|
||||
message.isActive = false;
|
||||
}
|
||||
if (object.isMoving !== undefined && object.isMoving !== null) {
|
||||
message.isMoving = object.isMoving;
|
||||
} else {
|
||||
message.isMoving = false;
|
||||
}
|
||||
if (object.playerIndex !== undefined && object.playerIndex !== null) {
|
||||
message.playerIndex = object.playerIndex;
|
||||
} else {
|
||||
message.playerIndex = undefined;
|
||||
}
|
||||
if (object.lastUserIndex !== undefined && object.lastUserIndex !== null) {
|
||||
message.lastUserIndex = object.lastUserIndex;
|
||||
} else {
|
||||
message.lastUserIndex = undefined;
|
||||
}
|
||||
if (object.colour !== undefined && object.colour !== null) {
|
||||
message.colour = Colour.fromPartial(object.colour);
|
||||
} else {
|
||||
message.colour = undefined;
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseLuaSurface: object = { index: 0, name: "", daytime: 0 };
|
||||
|
||||
export const LuaSurface = {
|
||||
encode(
|
||||
message: LuaSurface,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.index !== 0) {
|
||||
writer.uint32(8).uint32(message.index);
|
||||
}
|
||||
if (message.name !== "") {
|
||||
writer.uint32(18).string(message.name);
|
||||
}
|
||||
if (message.daytime !== 0) {
|
||||
writer.uint32(29).float(message.daytime);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): LuaSurface {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...baseLuaSurface } as LuaSurface;
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.index = reader.uint32();
|
||||
break;
|
||||
case 2:
|
||||
message.name = reader.string();
|
||||
break;
|
||||
case 3:
|
||||
message.daytime = reader.float();
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<LuaSurface>): LuaSurface {
|
||||
const message = { ...baseLuaSurface } as LuaSurface;
|
||||
if (object.index !== undefined && object.index !== null) {
|
||||
message.index = object.index;
|
||||
} else {
|
||||
message.index = 0;
|
||||
}
|
||||
if (object.name !== undefined && object.name !== null) {
|
||||
message.name = object.name;
|
||||
} else {
|
||||
message.name = "";
|
||||
}
|
||||
if (object.daytime !== undefined && object.daytime !== null) {
|
||||
message.daytime = object.daytime;
|
||||
} else {
|
||||
message.daytime = 0;
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseLuaForce: object = { index: 0, forceName: "", playerIds: 0 };
|
||||
|
||||
export const LuaForce = {
|
||||
encode(
|
||||
message: LuaForce,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.index !== 0) {
|
||||
writer.uint32(8).uint32(message.index);
|
||||
}
|
||||
if (message.forceName !== "") {
|
||||
writer.uint32(18).string(message.forceName);
|
||||
}
|
||||
writer.uint32(802).fork();
|
||||
for (const v of message.playerIds) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.ldelim();
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): LuaForce {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...baseLuaForce } as LuaForce;
|
||||
message.playerIds = [];
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.index = reader.uint32();
|
||||
break;
|
||||
case 2:
|
||||
message.forceName = reader.string();
|
||||
break;
|
||||
case 100:
|
||||
if ((tag & 7) === 2) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.playerIds.push(reader.uint32());
|
||||
}
|
||||
} else {
|
||||
message.playerIds.push(reader.uint32());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<LuaForce>): LuaForce {
|
||||
const message = { ...baseLuaForce } as LuaForce;
|
||||
message.playerIds = [];
|
||||
if (object.index !== undefined && object.index !== null) {
|
||||
message.index = object.index;
|
||||
} else {
|
||||
message.index = 0;
|
||||
}
|
||||
if (object.forceName !== undefined && object.forceName !== null) {
|
||||
message.forceName = object.forceName;
|
||||
} else {
|
||||
message.forceName = "";
|
||||
}
|
||||
if (object.playerIds !== undefined && object.playerIds !== null) {
|
||||
for (const e of object.playerIds) {
|
||||
message.playerIds.push(e);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const basePosition: object = { x: 0, y: 0 };
|
||||
|
||||
export const Position = {
|
||||
encode(
|
||||
message: Position,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.x !== 0) {
|
||||
writer.uint32(8).int32(message.x);
|
||||
}
|
||||
if (message.y !== 0) {
|
||||
writer.uint32(16).int32(message.y);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): Position {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...basePosition } as Position;
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.x = reader.int32();
|
||||
break;
|
||||
case 2:
|
||||
message.y = reader.int32();
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Position>): Position {
|
||||
const message = { ...basePosition } as Position;
|
||||
if (object.x !== undefined && object.x !== null) {
|
||||
message.x = object.x;
|
||||
} else {
|
||||
message.x = 0;
|
||||
}
|
||||
if (object.y !== undefined && object.y !== null) {
|
||||
message.y = object.y;
|
||||
} else {
|
||||
message.y = 0;
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseColour: object = { red: 0, green: 0, blue: 0, alpha: 0 };
|
||||
|
||||
export const Colour = {
|
||||
encode(
|
||||
message: Colour,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.red !== 0) {
|
||||
writer.uint32(13).float(message.red);
|
||||
}
|
||||
if (message.green !== 0) {
|
||||
writer.uint32(21).float(message.green);
|
||||
}
|
||||
if (message.blue !== 0) {
|
||||
writer.uint32(29).float(message.blue);
|
||||
}
|
||||
if (message.alpha !== 0) {
|
||||
writer.uint32(37).float(message.alpha);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): Colour {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = { ...baseColour } as Colour;
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.red = reader.float();
|
||||
break;
|
||||
case 2:
|
||||
message.green = reader.float();
|
||||
break;
|
||||
case 3:
|
||||
message.blue = reader.float();
|
||||
break;
|
||||
case 4:
|
||||
message.alpha = reader.float();
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Colour>): Colour {
|
||||
const message = { ...baseColour } as Colour;
|
||||
if (object.red !== undefined && object.red !== null) {
|
||||
message.red = object.red;
|
||||
} else {
|
||||
message.red = 0;
|
||||
}
|
||||
if (object.green !== undefined && object.green !== null) {
|
||||
message.green = object.green;
|
||||
} else {
|
||||
message.green = 0;
|
||||
}
|
||||
if (object.blue !== undefined && object.blue !== null) {
|
||||
message.blue = object.blue;
|
||||
} else {
|
||||
message.blue = 0;
|
||||
}
|
||||
if (object.alpha !== undefined && object.alpha !== null) {
|
||||
message.alpha = object.alpha;
|
||||
} else {
|
||||
message.alpha = 0;
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends Array<infer U>
|
||||
? Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U>
|
||||
? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends {}
|
||||
? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
if (_m0.util.Long !== Long) {
|
||||
_m0.util.Long = Long as any;
|
||||
_m0.configure();
|
||||
}
|
||||
|
|
@ -10,9 +10,7 @@
|
|||
"types": [
|
||||
"typescript-to-lua/language-extensions",
|
||||
"lua-types/5.2",
|
||||
"typed-factorio/runtime",
|
||||
"protobufjs/minimal.d.ts",
|
||||
"@types/long"
|
||||
"typed-factorio/runtime"
|
||||
],
|
||||
"explainFiles": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
|
@ -33,29 +31,5 @@
|
|||
"noHeader": true,
|
||||
"noImplicitSelf": true,
|
||||
"luaLibImport": "inline"
|
||||
},
|
||||
"//": {
|
||||
"noResolve": true,
|
||||
"newLine": "lf",
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
],
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"skipLibCheck": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"types": [
|
||||
"node",
|
||||
"typed-factorio/runtime",
|
||||
"lua-types/5.2"
|
||||
],
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"//": "lua-types/5.2",
|
||||
"luaLibImport": "inline",
|
||||
"noImplicitSelf": true,
|
||||
"sourceMapTraceback": true,
|
||||
"luaBundle ": "bundle.lua",
|
||||
"luaBundleEntry ": "bundleEntry.lua"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,162 +0,0 @@
|
|||
import com.github.gradle.node.npm.task.NpmTask
|
||||
import com.github.gradle.node.task.NodeTask
|
||||
import org.gradle.api.internal.project.ProjectInternal
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dukat.DukatRunner
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dukat.ExternalsOutputFormat
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.RootPackageJsonTask
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinPackageJsonTask
|
||||
import org.jetbrains.kotlin.util.parseSpaceSeparatedArgs
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.NpmProject
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.npmProject
|
||||
|
||||
plugins {
|
||||
id("dev.adamko.factoriowebmap.archetype.kotlin-js")
|
||||
}
|
||||
|
||||
//group = rootProject.group.toString() + "." + project.name
|
||||
//version = rootProject.version
|
||||
//
|
||||
//val projectId = rootProject.name + "-" + project.name
|
||||
val projectId: String by project.extra
|
||||
val modBuildDir: Directory = layout.buildDirectory.dir(projectId).get()
|
||||
val nodeModulesDir: Directory by project.extra
|
||||
|
||||
kotlin {
|
||||
|
||||
js(IR) {
|
||||
|
||||
binaries.executable()
|
||||
|
||||
useCommonJs()
|
||||
nodejs()
|
||||
|
||||
// compilations.all {
|
||||
compilations["main"].apply {
|
||||
packageJson {
|
||||
customField(
|
||||
"scripts",
|
||||
mapOf(
|
||||
"build" to "tstl",
|
||||
"dev" to "tstl --watch",
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// kotlin.srcDir("src/main/myKotlin")
|
||||
// }
|
||||
sourceSets["main"].apply {
|
||||
// sourceSets.create("dukat").apply {
|
||||
kotlin.srcDir(project.layout.projectDirectory.dir("dukat-custom"))
|
||||
}
|
||||
|
||||
|
||||
// sourceSets {
|
||||
// all {
|
||||
// languageSettings.optIn("kotlin.ExperimentalStdlibApi")
|
||||
// languageSettings.optIn("kotlin.time.ExperimentalTime")
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
|
||||
// bom is defined in archetype.kotlin-js
|
||||
|
||||
implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
|
||||
// implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
|
||||
implementation(npm("react", "17.0.2"))
|
||||
// implementation(npm("react-dom", "17.0.2"))
|
||||
|
||||
// implementation("org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7") {
|
||||
// because("https://github.com/Kotlin/kotlinx-nodejs")
|
||||
// }
|
||||
|
||||
val generateExternals = false
|
||||
implementation(npm("typescript-to-lua", "1.0.1", generateExternals = generateExternals))
|
||||
implementation(npm("typed-factorio", "0.7.1", generateExternals = true))
|
||||
implementation(npm("lua-types", "2.11.0", generateExternals = generateExternals))
|
||||
implementation(npm("typescript", "4.4.3", generateExternals = generateExternals))
|
||||
|
||||
testImplementation(kotlin("test-js"))
|
||||
}
|
||||
|
||||
//val rootPackageJson: RootPackageJsonTask by tasks.getting(RootPackageJsonTask::class)
|
||||
//val rootPackageJson by rootProject.tasks.getting(RootPackageJsonTask::class)
|
||||
//val packageJson by rootProject.tasks.getting(KotlinPackageJsonTask::class)
|
||||
//val packageJson : RootPackageJsonTask by tasks.named<RootPackageJsonTask>(RootPackageJsonTask.NAME)
|
||||
|
||||
//node {
|
||||
// download.set(true)
|
||||
// version.set("14.18.0")
|
||||
//
|
||||
// distBaseUrl.set(null as String?) // set by dependencyResolutionManagement
|
||||
//
|
||||
// nodeProjectDir.set(rootPackageJson.rootPackageJson.parentFile.normalize())
|
||||
//// nodeProjectDir.set(packageJson.packageJson.parentFile.normalize())
|
||||
//}
|
||||
|
||||
|
||||
//fun NpmTask.setNodeModulesPath(path: String): Unit =
|
||||
// environment.put("NODE_PATH", path)
|
||||
//
|
||||
//fun NpmTask.setNodeModulesPath(folder: File): Unit =
|
||||
// setNodeModulesPath(folder.normalize().absolutePath)
|
||||
|
||||
tasks {
|
||||
register<NpmTask>("tstl") {
|
||||
description = "Typescript To Lua"
|
||||
group = projectId
|
||||
|
||||
dependsOn(build)
|
||||
|
||||
// setNodeModulesPath(node.nodeProjectDir.dir("node_modules").get().asFile)
|
||||
// setNodeModulesPath(node.nodeProjectDir.dir(NpmProject.NODE_MODULES).get().asFile)
|
||||
val nodeModulesDir: Directory by project.extra
|
||||
environment.put("NODE_PATH", nodeModulesDir.asFile.absolutePath)
|
||||
|
||||
execOverrides { standardOutput = System.out }
|
||||
|
||||
npmCommand.set(listOf("run", "build"))
|
||||
|
||||
val outputDir = modBuildDir.dir("tstl")
|
||||
args.set(parseSpaceSeparatedArgs("-- --outDir $outputDir"))
|
||||
outputs.dir(outputDir)
|
||||
|
||||
ignoreExitValue.set(false)
|
||||
inputs.dir(rootProject.layout.buildDirectory.dir("js"))
|
||||
}
|
||||
|
||||
register<DefaultTask>("dukat-typed-factorio") {
|
||||
group = projectId
|
||||
|
||||
val npmProject = kotlin.js().compilations["main"].npmProject
|
||||
|
||||
val files = nodeModulesDir.dir("typed-factorio")
|
||||
.asFileTree
|
||||
.filter { it.extension in setOf("ts", "d.ts") }
|
||||
.files
|
||||
|
||||
logger.lifecycle("Converting typed-factorio files: ${files.joinToString { it.name }}")
|
||||
|
||||
val runner = DukatRunner(
|
||||
npmProject,
|
||||
files,
|
||||
ExternalsOutputFormat.SOURCE,
|
||||
project.layout.projectDirectory.dir("dukat-custom").asFile,
|
||||
)
|
||||
val services = (project as ProjectInternal).services
|
||||
doLast {
|
||||
runner.execute(services)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
configure<NodeJsRootExtension> {
|
||||
versions.dukat.version = "0.5.8-rc.4-dev.20211001"
|
||||
// versions.dukat.version = "0.5.8-rc.4"
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
//external fun collectgarbage(opt: String /* "count" | "generational" | "incremental" */): dynamic /* Unit */
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external fun load(chunk: String, chunkname: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally, env: Any? = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun load(chunk: String): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun load(chunk: String, chunkname: String = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun load(chunk: String, chunkname: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun load(chunk: () -> String?, chunkname: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally, env: Any? = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun load(chunk: () -> String?): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun load(chunk: () -> String?, chunkname: String = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun load(chunk: () -> String?, chunkname: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun loadfile(filename: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally, env: Any? = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun <This, Args : Array<Any>, R, E> xpcall(f: (self: This, args: Args) -> R, msgh: (self: Unit, err: Any) -> E, context: This, vararg args: Args): dynamic /* JsTuple<Boolean, R> | JsTuple<Boolean, E> */
|
||||
|
||||
external fun <Args : Array<Any>, R, E> xpcall(f: (self: Unit, args: Args) -> R, msgh: (err: Any) -> E, vararg args: Args): dynamic /* JsTuple<Boolean, R> | JsTuple<Boolean, E> */
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Record
|
||||
|
||||
//external var _ENV: Record<String, Any>
|
||||
|
||||
//external fun collectgarbage(opt: String /* "isrunning" */): Boolean
|
||||
|
||||
//external fun module(name: String, vararg options: Function<*>)
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
@file:JsQualifier("bit32")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package bit32
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external fun arshift(x: Number, disp: Number): Number
|
||||
|
||||
external fun band(vararg operands: Number): Number
|
||||
|
||||
external fun bnot(x: Number): Number
|
||||
|
||||
external fun bor(vararg operands: Number): Number
|
||||
|
||||
external fun btest(vararg operands: Number): Boolean
|
||||
|
||||
external fun bxor(vararg operands: Number): Number
|
||||
|
||||
external fun extract(n: Number, field: Number, width: Number = definedExternally): Number
|
||||
|
||||
external fun replace(n: Number, v: Number, field: Number, width: Number = definedExternally): Number
|
||||
|
||||
external fun lrotate(x: Number, disp: Number): Number
|
||||
|
||||
external fun lshift(x: Number, disp: Number): Number
|
||||
|
||||
external fun rrotate(x: Number, disp: Number): Number
|
||||
|
||||
external fun rshift(x: Number, disp: Number): Number
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import kotlinext.js.PropertyDescriptor
|
||||
|
||||
typealias float = Number
|
||||
|
||||
typealias double = Number
|
||||
|
||||
typealias int = Number
|
||||
|
||||
typealias int8 = Number
|
||||
|
||||
typealias uint = Number
|
||||
|
||||
typealias uint8 = Number
|
||||
|
||||
typealias uint16 = Number
|
||||
|
||||
typealias uint64 = Number
|
||||
|
||||
//typealias table = Any?
|
||||
// TODO LuaTable? AnyTable? index.module_typescript-to-lua.kt
|
||||
@JsName("table")
|
||||
class table : Object2()
|
||||
|
||||
/** https://github.com/JetBrains/kotlin-wrappers/blob/master/kotlin-extensions/src/main/kotlin/kotlinext/js/Object.kt */
|
||||
open external class Object2 {
|
||||
fun toLocaleString(): String
|
||||
fun valueOf(): dynamic
|
||||
fun hasOwnProperty(v: String): Boolean
|
||||
fun isPrototypeOf(v: Any): Boolean
|
||||
fun propertyIsEnumerable(v: String): Boolean
|
||||
|
||||
companion object {
|
||||
fun <P : Any, T : P> getPrototypeOf(o: T): P
|
||||
fun <T> getOwnPropertyDescriptor(o: Any, p: String): PropertyDescriptor<T>
|
||||
fun getOwnPropertyNames(o: Any): Array<String>
|
||||
fun <T : Any> create(o: T?, properties: dynamic = definedExternally): T
|
||||
fun <T : Any, P> defineProperty(o: T, p: String, attributes: PropertyDescriptor<P>): T
|
||||
fun <T : Any> defineProperties(o: T, properties: dynamic): T
|
||||
fun <T> seal(o: T): T
|
||||
fun <R, T : R> freeze(o: T): R
|
||||
fun <T> preventExtensions(o: T): T
|
||||
fun isSealed(o: Any): Boolean
|
||||
fun isFrozen(o: Any): Boolean
|
||||
fun isExtensible(o: Any): Boolean
|
||||
fun keys(o: Any): Array<String>
|
||||
fun <T : Any, R : T> assign(dest: R, vararg src: T?): R
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,30 +0,0 @@
|
|||
@file:JsQualifier("coroutine")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package coroutine
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import LuaThread
|
||||
|
||||
external fun create(f: (args: Any) -> Any): LuaThread
|
||||
|
||||
external fun resume(co: LuaThread, vararg param_val: Any): dynamic /* JsTuple<Boolean, Any> | JsTuple<Boolean, String> */
|
||||
|
||||
external fun status(co: LuaThread): String /* "running" | "suspended" | "normal" | "dead" */
|
||||
|
||||
external fun wrap(f: (args: Any) -> Any): (args: Any) -> Array<Any>
|
||||
|
||||
external fun yield(vararg args: Any): Array<Any> /* Array<Any> & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
|
||||
external fun running(): dynamic /* JsTuple<LuaThread, Boolean> */
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
@file:JsQualifier("debug")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package debug
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import LuaThread
|
||||
import LuaMetatable__1
|
||||
import tsstdlib.Record
|
||||
import LuaUserdata
|
||||
import LuaMetatable
|
||||
|
||||
external fun debug()
|
||||
|
||||
external fun gethook(thread: LuaThread = definedExternally): dynamic /* JsTuple<Nothing?, Number> | JsTuple<Function<*>, Number, Any> */
|
||||
|
||||
external interface FunctionInfo<T : Function<*>> {
|
||||
var nparams: Number
|
||||
var isvararg: Boolean?
|
||||
var istailcall: Boolean?
|
||||
var func: T
|
||||
var name: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var namewhat: String /* "global" | "local" | "method" | "field" | "" */
|
||||
var source: String
|
||||
var short_src: String
|
||||
var linedefined: Number
|
||||
var lastlinedefined: Number
|
||||
var what: String /* "Lua" | "C" | "main" */
|
||||
var currentline: Number
|
||||
var nups: Number
|
||||
}
|
||||
|
||||
external interface FunctionInfoPartial<T : Function<*>> {
|
||||
var nparams: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var isvararg: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var istailcall: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var func: T?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var name: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var namewhat: String? /* "global" | "local" | "method" | "field" | "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var source: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var short_src: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var linedefined: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var lastlinedefined: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var what: String? /* "Lua" | "C" | "main" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var currentline: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var nups: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface FunctionInfo__0 : FunctionInfo<Function<*>>
|
||||
|
||||
external interface FunctionInfo__0Partial : FunctionInfoPartial<Function<*>>
|
||||
|
||||
external fun <T : Function<*>> getinfo(f: T): FunctionInfo<T>
|
||||
|
||||
external fun <T : Function<*>> getinfo(f: T, what: String): FunctionInfoPartial<T>
|
||||
|
||||
external fun <T : Function<*>> getinfo(thread: LuaThread, f: T): FunctionInfo<T>
|
||||
|
||||
external fun <T : Function<*>> getinfo(thread: LuaThread, f: T, what: String): FunctionInfoPartial<T>
|
||||
|
||||
external fun getinfo(f: Number): FunctionInfo__0?
|
||||
|
||||
external fun getinfo(f: Number, what: String): FunctionInfo__0Partial?
|
||||
|
||||
external fun getinfo(thread: LuaThread, f: Number): FunctionInfo__0?
|
||||
|
||||
external fun getinfo(thread: LuaThread, f: Number, what: String): FunctionInfo__0Partial?
|
||||
|
||||
external fun <T : Any> getmetatable(value: T): LuaMetatable__1<T>?
|
||||
|
||||
external fun getregistry(): Record<String, Any>
|
||||
|
||||
external fun getupvalue(f: Function<*>, up: Number): dynamic /* JsTuple<String, Any> | JsTuple<> */
|
||||
|
||||
external fun getuservalue(u: LuaUserdata): Any
|
||||
|
||||
external fun sethook()
|
||||
|
||||
external fun sethook(hook: (event: String /* "call" | "return" | "line" | "count" */, line: Number) -> Any, mask: String, count: Number = definedExternally)
|
||||
|
||||
external fun sethook(hook: (event: String /* "call" | "return" | "line" | "count" */, line: Number) -> Any, mask: String)
|
||||
|
||||
external fun sethook(thread: LuaThread, hook: (event: String /* "call" | "return" | "line" | "count" */, line: Number) -> Any, mask: String, count: Number = definedExternally)
|
||||
|
||||
external fun sethook(thread: LuaThread, hook: (event: String /* "call" | "return" | "line" | "count" */, line: Number) -> Any, mask: String)
|
||||
|
||||
external fun setlocal(level: Number, local: Number, value: Any): String?
|
||||
|
||||
external fun setlocal(thread: LuaThread, level: Number, local: Number, value: Any): String?
|
||||
|
||||
external fun <T : Any?, TIndex> setmetatable(value: T, table: LuaMetatable<T, TIndex>? = definedExternally): Any
|
||||
|
||||
external fun setupvalue(f: Function<*>, up: Number, value: Any): String?
|
||||
|
||||
external fun setuservalue(udata: LuaUserdata, value: Any): LuaUserdata
|
||||
|
||||
external fun traceback(message: String? = definedExternally, level: Number? = definedExternally): String
|
||||
|
||||
external fun traceback(): String
|
||||
|
||||
external fun traceback(message: String? = definedExternally): String
|
||||
|
||||
external fun traceback(thread: LuaThread = definedExternally, message: String? = definedExternally, level: Number? = definedExternally): String
|
||||
|
||||
external fun traceback(thread: LuaThread = definedExternally): String
|
||||
|
||||
external fun traceback(thread: LuaThread = definedExternally, message: String? = definedExternally): String
|
||||
|
||||
external fun <T> traceback(message: T): T
|
||||
|
||||
external fun <T> traceback(thread: LuaThread, message: T): T
|
||||
|
||||
external fun getlocal(f: Function<*>, local: Number): dynamic /* JsTuple<String, Any> */
|
||||
|
||||
external fun getlocal(f: Number, local: Number): dynamic /* JsTuple<String, Any> */
|
||||
|
||||
external fun getlocal(thread: LuaThread, f: Function<*>, local: Number): dynamic /* JsTuple<String, Any> */
|
||||
|
||||
external fun getlocal(thread: LuaThread, f: Number, local: Number): dynamic /* JsTuple<String, Any> */
|
||||
|
||||
external fun upvalueid(f: Function<*>, n: Number): LuaUserdata
|
||||
|
||||
external fun upvaluejoin(f1: Function<*>, n1: Number, f2: Function<*>, n2: Number)
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
@file:JsQualifier("defines.control_behavior")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.control_behavior
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class type {
|
||||
container,
|
||||
generic_on_off,
|
||||
inserter,
|
||||
lamp,
|
||||
logistic_container,
|
||||
roboport,
|
||||
storage_tank,
|
||||
train_stop,
|
||||
decider_combinator,
|
||||
arithmetic_combinator,
|
||||
constant_combinator,
|
||||
transport_belt,
|
||||
accumulator,
|
||||
rail_signal,
|
||||
rail_chain_signal,
|
||||
wall,
|
||||
mining_drill,
|
||||
programmable_speaker
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
@file:JsQualifier("defines.control_behavior.inserter")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.control_behavior.inserter
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class circuit_mode_of_operation {
|
||||
none,
|
||||
enable_disable,
|
||||
set_filters,
|
||||
read_hand_contents,
|
||||
set_stack_size
|
||||
}
|
||||
|
||||
external enum class hand_read_mode {
|
||||
hold,
|
||||
pulse
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
@file:JsQualifier("defines.control_behavior.lamp")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.control_behavior.lamp
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class circuit_mode_of_operation {
|
||||
use_colors
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
@file:JsQualifier("defines.control_behavior.logistic_container")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.control_behavior.logistic_container
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class circuit_mode_of_operation {
|
||||
send_contents,
|
||||
set_requests
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
@file:JsQualifier("defines.control_behavior.mining_drill")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.control_behavior.mining_drill
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class resource_read_mode {
|
||||
this_miner,
|
||||
entire_patch
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
@file:JsQualifier("defines.control_behavior.transport_belt")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.control_behavior.transport_belt
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class content_read_mode {
|
||||
pulse,
|
||||
hold
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
@file:JsQualifier("defines.deconstruction_item")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.deconstruction_item
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class entity_filter_mode {
|
||||
whitelist,
|
||||
blacklist
|
||||
}
|
||||
|
||||
external enum class tile_filter_mode {
|
||||
whitelist,
|
||||
blacklist
|
||||
}
|
||||
|
||||
external enum class tile_selection_mode {
|
||||
normal,
|
||||
always,
|
||||
never,
|
||||
only
|
||||
}
|
||||
|
|
@ -1,668 +0,0 @@
|
|||
@file:JsQualifier("defines")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class alert_type {
|
||||
entity_destroyed,
|
||||
entity_under_attack,
|
||||
not_enough_construction_robots,
|
||||
no_material_for_construction,
|
||||
not_enough_repair_packs,
|
||||
turret_fire,
|
||||
custom,
|
||||
no_storage,
|
||||
train_out_of_fuel
|
||||
}
|
||||
|
||||
external enum class behavior_result {
|
||||
in_progress,
|
||||
fail,
|
||||
success,
|
||||
deleted
|
||||
}
|
||||
|
||||
external enum class build_check_type {
|
||||
script,
|
||||
manual,
|
||||
manual_ghost,
|
||||
script_ghost,
|
||||
blueprint_ghost,
|
||||
ghost_revive
|
||||
}
|
||||
|
||||
external enum class chain_signal_state {
|
||||
none,
|
||||
all_open,
|
||||
partially_open,
|
||||
none_open
|
||||
}
|
||||
|
||||
external enum class chunk_generated_status {
|
||||
nothing,
|
||||
custom_tiles,
|
||||
basic_tiles,
|
||||
corrected_tiles,
|
||||
tiles,
|
||||
entities
|
||||
}
|
||||
|
||||
external enum class circuit_condition_index {
|
||||
inserter_circuit,
|
||||
inserter_logistic,
|
||||
lamp,
|
||||
arithmetic_combinator,
|
||||
decider_combinator,
|
||||
constant_combinator,
|
||||
offshore_pump,
|
||||
pump
|
||||
}
|
||||
|
||||
external enum class circuit_connector_id {
|
||||
accumulator,
|
||||
constant_combinator,
|
||||
container,
|
||||
programmable_speaker,
|
||||
rail_signal,
|
||||
rail_chain_signal,
|
||||
roboport,
|
||||
storage_tank,
|
||||
wall,
|
||||
electric_pole,
|
||||
inserter,
|
||||
lamp,
|
||||
combinator_input,
|
||||
combinator_output,
|
||||
offshore_pump,
|
||||
pump
|
||||
}
|
||||
|
||||
external enum class command {
|
||||
attack /* = 0 */,
|
||||
go_to_location /* = 1 */,
|
||||
compound /* = 2 */,
|
||||
group /* = 3 */,
|
||||
attack_area /* = 4 */,
|
||||
wander /* = 5 */,
|
||||
flee /* = 6 */,
|
||||
stop /* = 7 */,
|
||||
build_base /* = 8 */
|
||||
}
|
||||
|
||||
external enum class compound_command {
|
||||
logical_and,
|
||||
logical_or,
|
||||
return_last
|
||||
}
|
||||
|
||||
external enum class controllers {
|
||||
ghost,
|
||||
character,
|
||||
god,
|
||||
editor,
|
||||
cutscene,
|
||||
spectator
|
||||
}
|
||||
|
||||
external enum class difficulty {
|
||||
easy,
|
||||
normal,
|
||||
hard
|
||||
}
|
||||
|
||||
external enum class direction {
|
||||
north /* = 0 */,
|
||||
northeast /* = 1 */,
|
||||
east /* = 2 */,
|
||||
southeast /* = 3 */,
|
||||
south /* = 4 */,
|
||||
southwest /* = 5 */,
|
||||
west /* = 6 */,
|
||||
northwest /* = 7 */
|
||||
}
|
||||
|
||||
external enum class disconnect_reason {
|
||||
quit,
|
||||
dropped,
|
||||
reconnect,
|
||||
wrong_input,
|
||||
desync_limit_reached,
|
||||
cannot_keep_up,
|
||||
afk,
|
||||
kicked,
|
||||
kicked_and_deleted,
|
||||
banned,
|
||||
switching_servers
|
||||
}
|
||||
|
||||
external enum class distraction {
|
||||
none,
|
||||
by_enemy,
|
||||
by_anything,
|
||||
by_damage
|
||||
}
|
||||
|
||||
external enum class entity_status {
|
||||
working,
|
||||
normal,
|
||||
no_power,
|
||||
low_power,
|
||||
no_fuel,
|
||||
disabled_by_control_behavior,
|
||||
opened_by_circuit_network,
|
||||
closed_by_circuit_network,
|
||||
disabled_by_script,
|
||||
marked_for_deconstruction,
|
||||
not_plugged_in_electric_network,
|
||||
networks_connected,
|
||||
networks_disconnected,
|
||||
charging,
|
||||
discharging,
|
||||
fully_charged,
|
||||
out_of_logistic_network,
|
||||
no_recipe,
|
||||
no_ingredients,
|
||||
no_input_fluid,
|
||||
no_research_in_progress,
|
||||
no_minable_resources,
|
||||
low_input_fluid,
|
||||
fluid_ingredient_shortage,
|
||||
full_output,
|
||||
item_ingredient_shortage,
|
||||
missing_required_fluid,
|
||||
missing_science_packs,
|
||||
waiting_for_source_items,
|
||||
waiting_for_space_in_destination,
|
||||
preparing_rocket_for_launch,
|
||||
waiting_to_launch_rocket,
|
||||
launching_rocket,
|
||||
no_modules_to_transmit,
|
||||
recharging_after_power_outage,
|
||||
waiting_for_target_to_be_built,
|
||||
waiting_for_train,
|
||||
no_ammo,
|
||||
low_temperature,
|
||||
disabled,
|
||||
turned_off_during_daytime,
|
||||
not_connected_to_rail,
|
||||
cant_divide_segments
|
||||
}
|
||||
|
||||
external enum class flow_precision_index {
|
||||
five_seconds,
|
||||
one_minute,
|
||||
ten_minutes,
|
||||
one_hour,
|
||||
ten_hours,
|
||||
fifty_hours,
|
||||
two_hundred_fifty_hours,
|
||||
one_thousand_hours
|
||||
}
|
||||
|
||||
external enum class group_state {
|
||||
gathering,
|
||||
moving,
|
||||
attacking_distraction,
|
||||
attacking_target,
|
||||
finished,
|
||||
pathfinding,
|
||||
wander_in_group
|
||||
}
|
||||
|
||||
external enum class gui_type {
|
||||
none,
|
||||
entity,
|
||||
research,
|
||||
controller,
|
||||
production,
|
||||
item,
|
||||
bonus,
|
||||
trains,
|
||||
achievement,
|
||||
blueprint_library,
|
||||
equipment,
|
||||
logistic,
|
||||
other_player,
|
||||
permissions,
|
||||
tutorials,
|
||||
custom,
|
||||
server_management,
|
||||
player_management,
|
||||
tile
|
||||
}
|
||||
|
||||
external enum class input_action {
|
||||
activate_copy,
|
||||
activate_cut,
|
||||
activate_paste,
|
||||
add_permission_group,
|
||||
add_train_station,
|
||||
admin_action,
|
||||
alt_select_area,
|
||||
alt_select_blueprint_entities,
|
||||
alternative_copy,
|
||||
begin_mining,
|
||||
begin_mining_terrain,
|
||||
build,
|
||||
build_rail,
|
||||
build_terrain,
|
||||
cancel_craft,
|
||||
cancel_deconstruct,
|
||||
cancel_new_blueprint,
|
||||
cancel_research,
|
||||
cancel_upgrade,
|
||||
change_active_character_tab,
|
||||
change_active_item_group_for_crafting,
|
||||
change_active_item_group_for_filters,
|
||||
change_active_quick_bar,
|
||||
change_arithmetic_combinator_parameters,
|
||||
change_decider_combinator_parameters,
|
||||
change_entity_label,
|
||||
change_item_description,
|
||||
change_item_label,
|
||||
change_multiplayer_config,
|
||||
change_picking_state,
|
||||
change_programmable_speaker_alert_parameters,
|
||||
change_programmable_speaker_circuit_parameters,
|
||||
change_programmable_speaker_parameters,
|
||||
change_riding_state,
|
||||
change_shooting_state,
|
||||
change_train_stop_station,
|
||||
change_train_wait_condition,
|
||||
change_train_wait_condition_data,
|
||||
clear_cursor,
|
||||
connect_rolling_stock,
|
||||
copy,
|
||||
copy_entity_settings,
|
||||
copy_opened_blueprint,
|
||||
copy_opened_item,
|
||||
craft,
|
||||
cursor_split,
|
||||
cursor_transfer,
|
||||
custom_input,
|
||||
cycle_blueprint_book_backwards,
|
||||
cycle_blueprint_book_forwards,
|
||||
deconstruct,
|
||||
delete_blueprint_library,
|
||||
delete_blueprint_record,
|
||||
delete_custom_tag,
|
||||
delete_permission_group,
|
||||
destroy_item,
|
||||
destroy_opened_item,
|
||||
disconnect_rolling_stock,
|
||||
drag_train_schedule,
|
||||
drag_train_wait_condition,
|
||||
drop_blueprint_record,
|
||||
drop_item,
|
||||
edit_blueprint_tool_preview,
|
||||
edit_custom_tag,
|
||||
edit_permission_group,
|
||||
export_blueprint,
|
||||
fast_entity_split,
|
||||
fast_entity_transfer,
|
||||
flush_opened_entity_fluid,
|
||||
flush_opened_entity_specific_fluid,
|
||||
go_to_train_station,
|
||||
grab_blueprint_record,
|
||||
gui_checked_state_changed,
|
||||
gui_click,
|
||||
gui_confirmed,
|
||||
gui_elem_changed,
|
||||
gui_location_changed,
|
||||
gui_selected_tab_changed,
|
||||
gui_selection_state_changed,
|
||||
gui_switch_state_changed,
|
||||
gui_text_changed,
|
||||
gui_value_changed,
|
||||
import_blueprint,
|
||||
import_blueprint_string,
|
||||
import_blueprints_filtered,
|
||||
import_permissions_string,
|
||||
inventory_split,
|
||||
inventory_transfer,
|
||||
launch_rocket,
|
||||
lua_shortcut,
|
||||
map_editor_action,
|
||||
market_offer,
|
||||
mod_settings_changed,
|
||||
open_achievements_gui,
|
||||
open_blueprint_library_gui,
|
||||
open_blueprint_record,
|
||||
open_bonus_gui,
|
||||
open_character_gui,
|
||||
open_current_vehicle_gui,
|
||||
open_equipment,
|
||||
open_gui,
|
||||
open_item,
|
||||
open_logistic_gui,
|
||||
open_mod_item,
|
||||
open_parent_of_opened_item,
|
||||
open_production_gui,
|
||||
open_technology_gui,
|
||||
open_tips_and_tricks_gui,
|
||||
open_train_gui,
|
||||
open_train_station_gui,
|
||||
open_trains_gui,
|
||||
paste_entity_settings,
|
||||
place_equipment,
|
||||
quick_bar_pick_slot,
|
||||
quick_bar_set_selected_page,
|
||||
quick_bar_set_slot,
|
||||
reassign_blueprint,
|
||||
remove_cables,
|
||||
remove_train_station,
|
||||
reset_assembling_machine,
|
||||
reset_item,
|
||||
rotate_entity,
|
||||
select_area,
|
||||
select_blueprint_entities,
|
||||
select_entity_slot,
|
||||
select_item,
|
||||
select_mapper_slot,
|
||||
select_next_valid_gun,
|
||||
select_tile_slot,
|
||||
send_spidertron,
|
||||
set_auto_launch_rocket,
|
||||
set_autosort_inventory,
|
||||
set_behavior_mode,
|
||||
set_car_weapons_control,
|
||||
set_circuit_condition,
|
||||
set_circuit_mode_of_operation,
|
||||
set_controller_logistic_trash_filter_item,
|
||||
set_deconstruction_item_tile_selection_mode,
|
||||
set_deconstruction_item_trees_and_rocks_only,
|
||||
set_entity_color,
|
||||
set_entity_energy_property,
|
||||
set_entity_logistic_trash_filter_item,
|
||||
set_filter,
|
||||
set_flat_controller_gui,
|
||||
set_heat_interface_mode,
|
||||
set_heat_interface_temperature,
|
||||
set_infinity_container_filter_item,
|
||||
set_infinity_container_remove_unfiltered_items,
|
||||
set_infinity_pipe_filter,
|
||||
set_inserter_max_stack_size,
|
||||
set_inventory_bar,
|
||||
set_linked_container_link_i_d,
|
||||
set_logistic_filter_item,
|
||||
set_logistic_filter_signal,
|
||||
set_player_color,
|
||||
set_recipe_notifications,
|
||||
set_request_from_buffers,
|
||||
set_research_finished_stops_game,
|
||||
set_signal,
|
||||
set_splitter_priority,
|
||||
set_train_stopped,
|
||||
set_trains_limit,
|
||||
set_vehicle_automatic_targeting_parameters,
|
||||
setup_assembling_machine,
|
||||
setup_blueprint,
|
||||
setup_single_blueprint_record,
|
||||
smart_pipette,
|
||||
spawn_item,
|
||||
stack_split,
|
||||
stack_transfer,
|
||||
start_repair,
|
||||
start_research,
|
||||
start_walking,
|
||||
stop_building_by_moving,
|
||||
switch_connect_to_logistic_network,
|
||||
switch_constant_combinator_state,
|
||||
switch_inserter_filter_mode_state,
|
||||
switch_power_switch_state,
|
||||
switch_to_rename_stop_gui,
|
||||
take_equipment,
|
||||
toggle_deconstruction_item_entity_filter_mode,
|
||||
toggle_deconstruction_item_tile_filter_mode,
|
||||
toggle_driving,
|
||||
toggle_enable_vehicle_logistics_while_moving,
|
||||
toggle_entity_logistic_requests,
|
||||
toggle_equipment_movement_bonus,
|
||||
toggle_map_editor,
|
||||
toggle_personal_logistic_requests,
|
||||
toggle_personal_roboport,
|
||||
toggle_show_entity_info,
|
||||
translate_string,
|
||||
undo,
|
||||
upgrade,
|
||||
upgrade_opened_blueprint_by_item,
|
||||
upgrade_opened_blueprint_by_record,
|
||||
use_artillery_remote,
|
||||
use_item,
|
||||
wire_dragging,
|
||||
write_to_console
|
||||
}
|
||||
|
||||
external enum class inventory {
|
||||
fuel,
|
||||
burnt_result,
|
||||
chest,
|
||||
furnace_source,
|
||||
furnace_result,
|
||||
furnace_modules,
|
||||
character_main,
|
||||
character_guns,
|
||||
character_ammo,
|
||||
character_armor,
|
||||
character_vehicle,
|
||||
character_trash,
|
||||
god_main,
|
||||
editor_main,
|
||||
editor_guns,
|
||||
editor_ammo,
|
||||
editor_armor,
|
||||
roboport_robot,
|
||||
roboport_material,
|
||||
robot_cargo,
|
||||
robot_repair,
|
||||
assembling_machine_input,
|
||||
assembling_machine_output,
|
||||
assembling_machine_modules,
|
||||
lab_input,
|
||||
lab_modules,
|
||||
mining_drill_modules,
|
||||
item_main,
|
||||
rocket_silo_rocket,
|
||||
rocket_silo_result,
|
||||
rocket,
|
||||
car_trunk,
|
||||
car_ammo,
|
||||
cargo_wagon,
|
||||
turret_ammo,
|
||||
beacon_modules,
|
||||
character_corpse,
|
||||
artillery_turret_ammo,
|
||||
artillery_wagon_ammo,
|
||||
spider_trunk,
|
||||
spider_ammo,
|
||||
spider_trash
|
||||
}
|
||||
|
||||
external enum class logistic_member_index {
|
||||
logistic_container,
|
||||
vehicle_storage,
|
||||
character_requester,
|
||||
character_storage,
|
||||
character_provider,
|
||||
generic_on_off_behavior
|
||||
}
|
||||
|
||||
external enum class logistic_mode {
|
||||
none,
|
||||
active_provider,
|
||||
storage,
|
||||
requester,
|
||||
passive_provider,
|
||||
buffer
|
||||
}
|
||||
|
||||
external enum class mouse_button_type {
|
||||
none,
|
||||
left,
|
||||
right,
|
||||
middle
|
||||
}
|
||||
|
||||
external var prototypes: Any
|
||||
|
||||
external enum class rail_connection_direction {
|
||||
left,
|
||||
straight,
|
||||
right,
|
||||
none
|
||||
}
|
||||
|
||||
external enum class rail_direction {
|
||||
front,
|
||||
back
|
||||
}
|
||||
|
||||
external enum class relative_gui_position {
|
||||
top,
|
||||
bottom,
|
||||
left,
|
||||
right
|
||||
}
|
||||
|
||||
external enum class relative_gui_type {
|
||||
accumulator_gui,
|
||||
achievement_gui,
|
||||
additional_entity_info_gui,
|
||||
admin_gui,
|
||||
arithmetic_combinator_gui,
|
||||
armor_gui,
|
||||
assembling_machine_gui,
|
||||
assembling_machine_select_recipe_gui,
|
||||
beacon_gui,
|
||||
blueprint_book_gui,
|
||||
blueprint_library_gui,
|
||||
blueprint_setup_gui,
|
||||
bonus_gui,
|
||||
burner_equipment_gui,
|
||||
car_gui,
|
||||
constant_combinator_gui,
|
||||
container_gui,
|
||||
controller_gui,
|
||||
decider_combinator_gui,
|
||||
deconstruction_item_gui,
|
||||
electric_energy_interface_gui,
|
||||
electric_network_gui,
|
||||
entity_variations_gui,
|
||||
entity_with_energy_source_gui,
|
||||
equipment_grid_gui,
|
||||
furnace_gui,
|
||||
generic_on_off_entity_gui,
|
||||
heat_interface_gui,
|
||||
infinity_pipe_gui,
|
||||
inserter_gui,
|
||||
item_with_inventory_gui,
|
||||
lab_gui,
|
||||
lamp_gui,
|
||||
linked_container_gui,
|
||||
loader_gui,
|
||||
logistic_gui,
|
||||
market_gui,
|
||||
mining_drill_gui,
|
||||
other_player_gui,
|
||||
permissions_gui,
|
||||
pipe_gui,
|
||||
power_switch_gui,
|
||||
production_gui,
|
||||
programmable_speaker_gui,
|
||||
rail_chain_signal_gui,
|
||||
rail_signal_gui,
|
||||
reactor_gui,
|
||||
rename_stop_gui,
|
||||
resource_entity_gui,
|
||||
roboport_gui,
|
||||
rocket_silo_gui,
|
||||
server_config_gui,
|
||||
spider_vehicle_gui,
|
||||
splitter_gui,
|
||||
standalone_character_gui,
|
||||
storage_tank_gui,
|
||||
tile_variations_gui,
|
||||
train_gui,
|
||||
train_stop_gui,
|
||||
trains_gui,
|
||||
transport_belt_gui,
|
||||
upgrade_item_gui,
|
||||
wall_gui
|
||||
}
|
||||
|
||||
external enum class render_mode {
|
||||
game,
|
||||
chart,
|
||||
chart_zoomed_in
|
||||
}
|
||||
|
||||
external enum class rich_text_setting {
|
||||
enabled,
|
||||
disabled,
|
||||
highlight
|
||||
}
|
||||
|
||||
external enum class shooting {
|
||||
not_shooting,
|
||||
shooting_enemies,
|
||||
shooting_selected
|
||||
}
|
||||
|
||||
external enum class signal_state {
|
||||
open,
|
||||
closed,
|
||||
reserved,
|
||||
reserved_by_circuit_network
|
||||
}
|
||||
|
||||
external enum class train_state {
|
||||
on_the_path,
|
||||
path_lost,
|
||||
no_schedule,
|
||||
no_path,
|
||||
arrive_signal,
|
||||
wait_signal,
|
||||
arrive_station,
|
||||
wait_station,
|
||||
manual_control_stop,
|
||||
manual_control,
|
||||
destination_full
|
||||
}
|
||||
|
||||
external enum class transport_line {
|
||||
left_line,
|
||||
right_line,
|
||||
left_underground_line,
|
||||
right_underground_line,
|
||||
secondary_left_line,
|
||||
secondary_right_line,
|
||||
left_split_line,
|
||||
right_split_line,
|
||||
secondary_left_split_line,
|
||||
secondary_right_split_line
|
||||
}
|
||||
|
||||
external enum class wire_connection_id {
|
||||
electric_pole,
|
||||
power_switch_left,
|
||||
power_switch_right
|
||||
}
|
||||
|
||||
external enum class wire_type {
|
||||
red,
|
||||
green,
|
||||
copper
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
@file:JsQualifier("defines.difficulty_settings")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.difficulty_settings
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class recipe_difficulty {
|
||||
normal,
|
||||
expensive
|
||||
}
|
||||
|
||||
external enum class technology_difficulty {
|
||||
normal,
|
||||
expensive
|
||||
}
|
||||
|
|
@ -1,366 +0,0 @@
|
|||
@file:JsQualifier("defines.events")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.events
|
||||
|
||||
import EventId
|
||||
import OnTickEvent
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import uint
|
||||
|
||||
external var on_tick: EventId<OnTickEvent> /* uint & `T$93`<OnTickEvent, Unit> */
|
||||
|
||||
external var on_gui_click: uint /* uint & `T$93`<OnGuiClickEvent, Unit> */
|
||||
|
||||
external var on_gui_confirmed: uint /* uint & `T$93`<OnGuiConfirmedEvent, Unit> */
|
||||
|
||||
external var on_gui_text_changed: uint /* uint & `T$93`<OnGuiTextChangedEvent, Unit> */
|
||||
|
||||
external var on_gui_checked_state_changed: uint /* uint & `T$93`<OnGuiCheckedStateChangedEvent, Unit> */
|
||||
|
||||
external var on_entity_died: uint /* uint & `T$93`<OnEntityDiedEvent, LuaEntityDiedEventFilter> */
|
||||
|
||||
external var on_post_entity_died: uint /* uint & `T$93`<OnPostEntityDiedEvent, LuaPostEntityDiedEventFilter> */
|
||||
|
||||
external var on_entity_damaged: uint /* uint & `T$93`<OnEntityDamagedEvent, LuaEntityDamagedEventFilter> */
|
||||
|
||||
external var on_picked_up_item: uint /* uint & `T$93`<OnPickedUpItemEvent, Unit> */
|
||||
|
||||
external var on_built_entity: uint /* uint & `T$93`<OnBuiltEntityEvent, LuaPlayerBuiltEntityEventFilter> */
|
||||
|
||||
external var on_sector_scanned: uint /* uint & `T$93`<OnSectorScannedEvent, LuaSectorScannedEventFilter> */
|
||||
|
||||
external var on_player_mined_item: uint /* uint & `T$93`<OnPlayerMinedItemEvent, Unit> */
|
||||
|
||||
external var on_pre_build: uint /* uint & `T$93`<OnPreBuildEvent, Unit> */
|
||||
|
||||
external var on_rocket_launched: uint /* uint & `T$93`<OnRocketLaunchedEvent, Unit> */
|
||||
|
||||
external var on_pre_player_mined_item: uint /* uint & `T$93`<OnPrePlayerMinedItemEvent, LuaPrePlayerMinedEntityEventFilter> */
|
||||
|
||||
external var on_chunk_generated: uint /* uint & `T$93`<OnChunkGeneratedEvent, Unit> */
|
||||
|
||||
external var on_player_crafted_item: uint /* uint & `T$93`<OnPlayerCraftedItemEvent, Unit> */
|
||||
|
||||
external var on_robot_built_entity: uint /* uint & `T$93`<OnRobotBuiltEntityEvent, LuaRobotBuiltEntityEventFilter> */
|
||||
|
||||
external var on_robot_pre_mined: uint /* uint & `T$93`<OnRobotPreMinedEvent, LuaPreRobotMinedEntityEventFilter> */
|
||||
|
||||
external var on_robot_mined: uint /* uint & `T$93`<OnRobotMinedEvent, Unit> */
|
||||
|
||||
external var on_research_started: uint /* uint & `T$93`<OnResearchStartedEvent, Unit> */
|
||||
|
||||
external var on_research_finished: uint /* uint & `T$93`<OnResearchFinishedEvent, Unit> */
|
||||
|
||||
external var on_research_reversed: uint /* uint & `T$93`<OnResearchReversedEvent, Unit> */
|
||||
|
||||
external var on_player_rotated_entity: uint /* uint & `T$93`<OnPlayerRotatedEntityEvent, Unit> */
|
||||
|
||||
external var on_marked_for_deconstruction: uint /* uint & `T$93`<OnMarkedForDeconstructionEvent, LuaEntityMarkedForDeconstructionEventFilter> */
|
||||
|
||||
external var on_cancelled_deconstruction: uint /* uint & `T$93`<OnCancelledDeconstructionEvent, LuaEntityDeconstructionCancelledEventFilter> */
|
||||
|
||||
external var on_trigger_created_entity: uint /* uint & `T$93`<OnTriggerCreatedEntityEvent, Unit> */
|
||||
|
||||
external var on_trigger_fired_artillery: uint /* uint & `T$93`<OnTriggerFiredArtilleryEvent, Unit> */
|
||||
|
||||
external var on_train_changed_state: uint /* uint & `T$93`<OnTrainChangedStateEvent, Unit> */
|
||||
|
||||
external var on_player_created: uint /* uint & `T$93`<OnPlayerCreatedEvent, Unit> */
|
||||
|
||||
external var on_resource_depleted: uint /* uint & `T$93`<OnResourceDepletedEvent, Unit> */
|
||||
|
||||
external var on_player_driving_changed_state: uint /* uint & `T$93`<OnPlayerDrivingChangedStateEvent, Unit> */
|
||||
|
||||
external var on_force_created: uint /* uint & `T$93`<OnForceCreatedEvent, Unit> */
|
||||
|
||||
external var on_forces_merging: uint /* uint & `T$93`<OnForcesMergingEvent, Unit> */
|
||||
|
||||
external var on_player_cursor_stack_changed: uint /* uint & `T$93`<OnPlayerCursorStackChangedEvent, Unit> */
|
||||
|
||||
external var on_pre_entity_settings_pasted: uint /* uint & `T$93`<OnPreEntitySettingsPastedEvent, Unit> */
|
||||
|
||||
external var on_entity_settings_pasted: uint /* uint & `T$93`<OnEntitySettingsPastedEvent, Unit> */
|
||||
|
||||
external var on_player_main_inventory_changed: uint /* uint & `T$93`<OnPlayerMainInventoryChangedEvent, Unit> */
|
||||
|
||||
external var on_player_armor_inventory_changed: uint /* uint & `T$93`<OnPlayerArmorInventoryChangedEvent, Unit> */
|
||||
|
||||
external var on_player_ammo_inventory_changed: uint /* uint & `T$93`<OnPlayerAmmoInventoryChangedEvent, Unit> */
|
||||
|
||||
external var on_player_gun_inventory_changed: uint /* uint & `T$93`<OnPlayerGunInventoryChangedEvent, Unit> */
|
||||
|
||||
external var on_player_placed_equipment: uint /* uint & `T$93`<OnPlayerPlacedEquipmentEvent, Unit> */
|
||||
|
||||
external var on_player_removed_equipment: uint /* uint & `T$93`<OnPlayerRemovedEquipmentEvent, Unit> */
|
||||
|
||||
external var on_pre_player_died: uint /* uint & `T$93`<OnPrePlayerDiedEvent, Unit> */
|
||||
|
||||
external var on_player_died: uint /* uint & `T$93`<OnPlayerDiedEvent, Unit> */
|
||||
|
||||
external var on_player_respawned: uint /* uint & `T$93`<OnPlayerRespawnedEvent, Unit> */
|
||||
|
||||
external var on_player_joined_game: uint /* uint & `T$93`<OnPlayerJoinedGameEvent, Unit> */
|
||||
|
||||
external var on_player_left_game: uint /* uint & `T$93`<OnPlayerLeftGameEvent, Unit> */
|
||||
|
||||
external var on_player_built_tile: uint /* uint & `T$93`<OnPlayerBuiltTileEvent, Unit> */
|
||||
|
||||
external var on_player_mined_tile: uint /* uint & `T$93`<OnPlayerMinedTileEvent, Unit> */
|
||||
|
||||
external var on_robot_built_tile: uint /* uint & `T$93`<OnRobotBuiltTileEvent, Unit> */
|
||||
|
||||
external var on_robot_mined_tile: uint /* uint & `T$93`<OnRobotMinedTileEvent, Unit> */
|
||||
|
||||
external var on_player_selected_area: uint /* uint & `T$93`<OnPlayerSelectedAreaEvent, Unit> */
|
||||
|
||||
external var on_player_alt_selected_area: uint /* uint & `T$93`<OnPlayerAltSelectedAreaEvent, Unit> */
|
||||
|
||||
external var on_player_changed_surface: uint /* uint & `T$93`<OnPlayerChangedSurfaceEvent, Unit> */
|
||||
|
||||
external var on_selected_entity_changed: uint /* uint & `T$93`<OnSelectedEntityChangedEvent, Unit> */
|
||||
|
||||
external var on_market_item_purchased: uint /* uint & `T$93`<OnMarketItemPurchasedEvent, Unit> */
|
||||
|
||||
external var on_player_dropped_item: uint /* uint & `T$93`<OnPlayerDroppedItemEvent, Unit> */
|
||||
|
||||
external var on_biter_base_built: uint /* uint & `T$93`<OnBiterBaseBuiltEvent, Unit> */
|
||||
|
||||
external var on_player_changed_force: uint /* uint & `T$93`<OnPlayerChangedForceEvent, Unit> */
|
||||
|
||||
external var on_entity_renamed: uint /* uint & `T$93`<OnEntityRenamedEvent, Unit> */
|
||||
|
||||
external var on_gui_selection_state_changed: uint /* uint & `T$93`<OnGuiSelectionStateChangedEvent, Unit> */
|
||||
|
||||
external var on_runtime_mod_setting_changed: uint /* uint & `T$93`<OnRuntimeModSettingChangedEvent, Unit> */
|
||||
|
||||
external var on_difficulty_settings_changed: uint /* uint & `T$93`<OnDifficultySettingsChangedEvent, Unit> */
|
||||
|
||||
external var on_surface_created: uint /* uint & `T$93`<OnSurfaceCreatedEvent, Unit> */
|
||||
|
||||
external var on_surface_deleted: uint /* uint & `T$93`<OnSurfaceDeletedEvent, Unit> */
|
||||
|
||||
external var on_pre_surface_deleted: uint /* uint & `T$93`<OnPreSurfaceDeletedEvent, Unit> */
|
||||
|
||||
external var on_player_mined_entity: uint /* uint & `T$93`<OnPlayerMinedEntityEvent, LuaPlayerMinedEntityEventFilter> */
|
||||
|
||||
external var on_robot_mined_entity: uint /* uint & `T$93`<OnRobotMinedEntityEvent, LuaRobotMinedEntityEventFilter> */
|
||||
|
||||
external var on_train_created: uint /* uint & `T$93`<OnTrainCreatedEvent, Unit> */
|
||||
|
||||
external var on_gui_elem_changed: uint /* uint & `T$93`<OnGuiElemChangedEvent, Unit> */
|
||||
|
||||
external var on_player_setup_blueprint: uint /* uint & `T$93`<OnPlayerSetupBlueprintEvent, Unit> */
|
||||
|
||||
external var on_player_deconstructed_area: uint /* uint & `T$93`<OnPlayerDeconstructedAreaEvent, Unit> */
|
||||
|
||||
external var on_player_configured_blueprint: uint /* uint & `T$93`<OnPlayerConfiguredBlueprintEvent, Unit> */
|
||||
|
||||
external var on_console_chat: uint /* uint & `T$93`<OnConsoleChatEvent, Unit> */
|
||||
|
||||
external var on_console_command: uint /* uint & `T$93`<OnConsoleCommandEvent, Unit> */
|
||||
|
||||
external var on_player_removed: uint /* uint & `T$93`<OnPlayerRemovedEvent, Unit> */
|
||||
|
||||
external var on_pre_player_removed: uint /* uint & `T$93`<OnPrePlayerRemovedEvent, Unit> */
|
||||
|
||||
external var on_player_used_capsule: uint /* uint & `T$93`<OnPlayerUsedCapsuleEvent, Unit> */
|
||||
|
||||
external var script_raised_built: uint /* uint & `T$93`<ScriptRaisedBuiltEvent, LuaScriptRaisedBuiltEventFilter> */
|
||||
|
||||
external var script_raised_destroy: uint /* uint & `T$93`<ScriptRaisedDestroyEvent, LuaScriptRaisedDestroyEventFilter> */
|
||||
|
||||
external var script_raised_revive: uint /* uint & `T$93`<ScriptRaisedReviveEvent, LuaScriptRaisedReviveEventFilter> */
|
||||
|
||||
external var script_raised_set_tiles: uint /* uint & `T$93`<ScriptRaisedSetTilesEvent, Unit> */
|
||||
|
||||
external var on_player_promoted: uint /* uint & `T$93`<OnPlayerPromotedEvent, Unit> */
|
||||
|
||||
external var on_player_demoted: uint /* uint & `T$93`<OnPlayerDemotedEvent, Unit> */
|
||||
|
||||
external var on_combat_robot_expired: uint /* uint & `T$93`<OnCombatRobotExpiredEvent, Unit> */
|
||||
|
||||
external var on_worker_robot_expired: uint /* uint & `T$93`<OnWorkerRobotExpiredEvent, Unit> */
|
||||
|
||||
external var on_player_changed_position: uint /* uint & `T$93`<OnPlayerChangedPositionEvent, Unit> */
|
||||
|
||||
external var on_mod_item_opened: uint /* uint & `T$93`<OnModItemOpenedEvent, Unit> */
|
||||
|
||||
external var on_gui_opened: uint /* uint & `T$93`<OnGuiOpenedEvent, Unit> */
|
||||
|
||||
external var on_gui_closed: uint /* uint & `T$93`<OnGuiClosedEvent, Unit> */
|
||||
|
||||
external var on_gui_value_changed: uint /* uint & `T$93`<OnGuiValueChangedEvent, Unit> */
|
||||
|
||||
external var on_player_muted: uint /* uint & `T$93`<OnPlayerMutedEvent, Unit> */
|
||||
|
||||
external var on_player_unmuted: uint /* uint & `T$93`<OnPlayerUnmutedEvent, Unit> */
|
||||
|
||||
external var on_player_cheat_mode_enabled: uint /* uint & `T$93`<OnPlayerCheatModeEnabledEvent, Unit> */
|
||||
|
||||
external var on_player_cheat_mode_disabled: uint /* uint & `T$93`<OnPlayerCheatModeDisabledEvent, Unit> */
|
||||
|
||||
external var on_character_corpse_expired: uint /* uint & `T$93`<OnCharacterCorpseExpiredEvent, Unit> */
|
||||
|
||||
external var on_pre_ghost_deconstructed: uint /* uint & `T$93`<OnPreGhostDeconstructedEvent, LuaPreGhostDeconstructedEventFilter> */
|
||||
|
||||
external var on_player_pipette: uint /* uint & `T$93`<OnPlayerPipetteEvent, Unit> */
|
||||
|
||||
external var on_player_display_resolution_changed: uint /* uint & `T$93`<OnPlayerDisplayResolutionChangedEvent, Unit> */
|
||||
|
||||
external var on_player_display_scale_changed: uint /* uint & `T$93`<OnPlayerDisplayScaleChangedEvent, Unit> */
|
||||
|
||||
external var on_pre_player_crafted_item: uint /* uint & `T$93`<OnPrePlayerCraftedItemEvent, Unit> */
|
||||
|
||||
external var on_player_cancelled_crafting: uint /* uint & `T$93`<OnPlayerCancelledCraftingEvent, Unit> */
|
||||
|
||||
external var on_chunk_charted: uint /* uint & `T$93`<OnChunkChartedEvent, Unit> */
|
||||
|
||||
external var on_technology_effects_reset: uint /* uint & `T$93`<OnTechnologyEffectsResetEvent, Unit> */
|
||||
|
||||
external var on_force_reset: uint /* uint & `T$93`<OnForceResetEvent, Unit> */
|
||||
|
||||
external var on_land_mine_armed: uint /* uint & `T$93`<OnLandMineArmedEvent, Unit> */
|
||||
|
||||
external var on_forces_merged: uint /* uint & `T$93`<OnForcesMergedEvent, Unit> */
|
||||
|
||||
external var on_player_trash_inventory_changed: uint /* uint & `T$93`<OnPlayerTrashInventoryChangedEvent, Unit> */
|
||||
|
||||
external var on_pre_player_left_game: uint /* uint & `T$93`<OnPrePlayerLeftGameEvent, Unit> */
|
||||
|
||||
external var on_pre_surface_cleared: uint /* uint & `T$93`<OnPreSurfaceClearedEvent, Unit> */
|
||||
|
||||
external var on_surface_cleared: uint /* uint & `T$93`<OnSurfaceClearedEvent, Unit> */
|
||||
|
||||
external var on_chunk_deleted: uint /* uint & `T$93`<OnChunkDeletedEvent, Unit> */
|
||||
|
||||
external var on_pre_chunk_deleted: uint /* uint & `T$93`<OnPreChunkDeletedEvent, Unit> */
|
||||
|
||||
external var on_train_schedule_changed: uint /* uint & `T$93`<OnTrainScheduleChangedEvent, Unit> */
|
||||
|
||||
external var on_player_banned: uint /* uint & `T$93`<OnPlayerBannedEvent, Unit> */
|
||||
|
||||
external var on_player_kicked: uint /* uint & `T$93`<OnPlayerKickedEvent, Unit> */
|
||||
|
||||
external var on_player_unbanned: uint /* uint & `T$93`<OnPlayerUnbannedEvent, Unit> */
|
||||
|
||||
external var on_rocket_launch_ordered: uint /* uint & `T$93`<OnRocketLaunchOrderedEvent, Unit> */
|
||||
|
||||
external var on_script_path_request_finished: uint /* uint & `T$93`<OnScriptPathRequestFinishedEvent, Unit> */
|
||||
|
||||
external var on_ai_command_completed: uint /* uint & `T$93`<OnAiCommandCompletedEvent, Unit> */
|
||||
|
||||
external var on_marked_for_upgrade: uint /* uint & `T$93`<OnMarkedForUpgradeEvent, LuaEntityMarkedForUpgradeEventFilter> */
|
||||
|
||||
external var on_cancelled_upgrade: uint /* uint & `T$93`<OnCancelledUpgradeEvent, LuaUpgradeCancelledEventFilter> */
|
||||
|
||||
external var on_player_toggled_map_editor: uint /* uint & `T$93`<OnPlayerToggledMapEditorEvent, Unit> */
|
||||
|
||||
external var on_entity_cloned: uint /* uint & `T$93`<OnEntityClonedEvent, LuaEntityClonedEventFilter> */
|
||||
|
||||
external var on_area_cloned: uint /* uint & `T$93`<OnAreaClonedEvent, Unit> */
|
||||
|
||||
external var on_brush_cloned: uint /* uint & `T$93`<OnBrushClonedEvent, Unit> */
|
||||
|
||||
external var on_game_created_from_scenario: uint /* uint & `T$93`<OnGameCreatedFromScenarioEvent, Unit> */
|
||||
|
||||
external var on_surface_imported: uint /* uint & `T$93`<OnSurfaceImportedEvent, Unit> */
|
||||
|
||||
external var on_surface_renamed: uint /* uint & `T$93`<OnSurfaceRenamedEvent, Unit> */
|
||||
|
||||
external var on_player_toggled_alt_mode: uint /* uint & `T$93`<OnPlayerToggledAltModeEvent, Unit> */
|
||||
|
||||
external var on_player_repaired_entity: uint /* uint & `T$93`<OnPlayerRepairedEntityEvent, LuaPlayerRepairedEntityEventFilter> */
|
||||
|
||||
external var on_player_fast_transferred: uint /* uint & `T$93`<OnPlayerFastTransferredEvent, Unit> */
|
||||
|
||||
external var on_pre_robot_exploded_cliff: uint /* uint & `T$93`<OnPreRobotExplodedCliffEvent, Unit> */
|
||||
|
||||
external var on_robot_exploded_cliff: uint /* uint & `T$93`<OnRobotExplodedCliffEvent, Unit> */
|
||||
|
||||
external var on_entity_spawned: uint /* uint & `T$93`<OnEntitySpawnedEvent, Unit> */
|
||||
|
||||
external var on_cutscene_waypoint_reached: uint /* uint & `T$93`<OnCutsceneWaypointReachedEvent, Unit> */
|
||||
|
||||
external var on_unit_group_created: uint /* uint & `T$93`<OnUnitGroupCreatedEvent, Unit> */
|
||||
|
||||
external var on_unit_added_to_group: uint /* uint & `T$93`<OnUnitAddedToGroupEvent, Unit> */
|
||||
|
||||
external var on_unit_removed_from_group: uint /* uint & `T$93`<OnUnitRemovedFromGroupEvent, Unit> */
|
||||
|
||||
external var on_unit_group_finished_gathering: uint /* uint & `T$93`<OnUnitGroupFinishedGatheringEvent, Unit> */
|
||||
|
||||
external var on_build_base_arrived: uint /* uint & `T$93`<OnBuildBaseArrivedEvent, Unit> */
|
||||
|
||||
external var on_chart_tag_added: uint /* uint & `T$93`<OnChartTagAddedEvent, Unit> */
|
||||
|
||||
external var on_chart_tag_modified: uint /* uint & `T$93`<OnChartTagModifiedEvent, Unit> */
|
||||
|
||||
external var on_chart_tag_removed: uint /* uint & `T$93`<OnChartTagRemovedEvent, Unit> */
|
||||
|
||||
external var on_lua_shortcut: uint /* uint & `T$93`<OnLuaShortcutEvent, Unit> */
|
||||
|
||||
external var on_gui_location_changed: uint /* uint & `T$93`<OnGuiLocationChangedEvent, Unit> */
|
||||
|
||||
external var on_gui_selected_tab_changed: uint /* uint & `T$93`<OnGuiSelectedTabChangedEvent, Unit> */
|
||||
|
||||
external var on_gui_switch_state_changed: uint /* uint & `T$93`<OnGuiSwitchStateChangedEvent, Unit> */
|
||||
|
||||
external var on_force_cease_fire_changed: uint /* uint & `T$93`<OnForceCeaseFireChangedEvent, Unit> */
|
||||
|
||||
external var on_force_friends_changed: uint /* uint & `T$93`<OnForceFriendsChangedEvent, Unit> */
|
||||
|
||||
external var on_string_translated: uint /* uint & `T$93`<OnStringTranslatedEvent, Unit> */
|
||||
|
||||
external var on_script_trigger_effect: uint /* uint & `T$93`<OnScriptTriggerEffectEvent, Unit> */
|
||||
|
||||
external var on_player_set_quick_bar_slot: uint /* uint & `T$93`<OnPlayerSetQuickBarSlotEvent, Unit> */
|
||||
|
||||
external var on_pre_player_toggled_map_editor: uint /* uint & `T$93`<OnPrePlayerToggledMapEditorEvent, Unit> */
|
||||
|
||||
external var on_pre_script_inventory_resized: uint /* uint & `T$93`<OnPreScriptInventoryResizedEvent, Unit> */
|
||||
|
||||
external var on_script_inventory_resized: uint /* uint & `T$93`<OnScriptInventoryResizedEvent, Unit> */
|
||||
|
||||
external var on_entity_destroyed: uint /* uint & `T$93`<OnEntityDestroyedEvent, Unit> */
|
||||
|
||||
external var on_player_clicked_gps_tag: uint /* uint & `T$93`<OnPlayerClickedGpsTagEvent, Unit> */
|
||||
|
||||
external var on_player_flushed_fluid: uint /* uint & `T$93`<OnPlayerFlushedFluidEvent, Unit> */
|
||||
|
||||
external var on_permission_group_edited: uint /* uint & `T$93`<OnPermissionGroupEditedEvent, Unit> */
|
||||
|
||||
external var on_pre_permission_string_imported: uint /* uint & `T$93`<OnPrePermissionStringImportedEvent, Unit> */
|
||||
|
||||
external var on_permission_string_imported: uint /* uint & `T$93`<OnPermissionStringImportedEvent, Unit> */
|
||||
|
||||
external var on_pre_permission_group_deleted: uint /* uint & `T$93`<OnPrePermissionGroupDeletedEvent, Unit> */
|
||||
|
||||
external var on_permission_group_deleted: uint /* uint & `T$93`<OnPermissionGroupDeletedEvent, Unit> */
|
||||
|
||||
external var on_permission_group_added: uint /* uint & `T$93`<OnPermissionGroupAddedEvent, Unit> */
|
||||
|
||||
external var on_cutscene_cancelled: uint /* uint & `T$93`<OnCutsceneCancelledEvent, Unit> */
|
||||
|
||||
external var on_player_configured_spider_remote: uint /* uint & `T$93`<OnPlayerConfiguredSpiderRemoteEvent, Unit> */
|
||||
|
||||
external var on_player_used_spider_remote: uint /* uint & `T$93`<OnPlayerUsedSpiderRemoteEvent, Unit> */
|
||||
|
||||
external var on_spider_command_completed: uint /* uint & `T$93`<OnSpiderCommandCompletedEvent, Unit> */
|
||||
|
||||
external var on_entity_logistic_slot_changed: uint /* uint & `T$93`<OnEntityLogisticSlotChangedEvent, Unit> */
|
||||
|
||||
external var on_equipment_inserted: uint /* uint & `T$93`<OnEquipmentInsertedEvent, Unit> */
|
||||
|
||||
external var on_equipment_removed: uint /* uint & `T$93`<OnEquipmentRemovedEvent, Unit> */
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
@file:JsQualifier("defines.riding")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package defines.riding
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class acceleration {
|
||||
nothing,
|
||||
accelerating,
|
||||
braking,
|
||||
reversing
|
||||
}
|
||||
|
||||
external enum class direction {
|
||||
left,
|
||||
straight,
|
||||
right
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
external class TsUInt : tsstdlib.Number
|
||||
|
||||
external class EventId<DataT: table, FilterT: table?> {
|
||||
@JsName("_eventData")
|
||||
val eventData: DataT
|
||||
|
||||
@JsName("_filter")
|
||||
val filter: FilterT
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,29 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external var game: LuaGameScript
|
||||
|
||||
external var script: LuaBootstrap
|
||||
|
||||
external var remote: LuaRemote
|
||||
|
||||
external var commands: LuaCommandProcessor
|
||||
|
||||
external var settings: LuaSettings
|
||||
|
||||
external var rcon: LuaRCON
|
||||
|
||||
external var rendering: LuaRendering
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER",
|
||||
"RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Record
|
||||
import tsstdlib.Iterable
|
||||
|
||||
external interface LuaThread {
|
||||
var __internal__: Any
|
||||
}
|
||||
|
||||
external interface LuaUserdata {
|
||||
var __internal__: Any
|
||||
}
|
||||
|
||||
external var _VERSION: String /* "Lua 5.1" | "Lua 5.2" | "Lua 5.3" | "Lua 5.4" */
|
||||
|
||||
external var _G: Any
|
||||
|
||||
external fun <V> assert(v: V): Any
|
||||
|
||||
external fun <V, A : Array<Any>> assert(v: V,
|
||||
vararg args: A): dynamic /* JsTuple<Exclude<V, Boolean?>, Any> */
|
||||
|
||||
external fun collectgarbage(opt: String /* "collect" | "stop" | "restart" */ = definedExternally)
|
||||
|
||||
external fun collectgarbage()
|
||||
|
||||
external fun collectgarbage(opt: String /* "setpause" | "setstepmul" | "step" */,
|
||||
arg: Number): dynamic /* Number | Boolean */
|
||||
|
||||
external fun dofile(filename: String = definedExternally): Any
|
||||
|
||||
external fun error(message: String, level: Number = definedExternally): Any
|
||||
|
||||
external fun <T> getmetatable(obj: T): LuaMetatable__1<T>?
|
||||
|
||||
external fun <T : Any> ipairs(
|
||||
t: kotlinext.js.Record<Number, T>):
|
||||
Iterable<dynamic /* JsTuple<Number, NonNullable<T>> */>
|
||||
/* Iterable<dynamic /* JsTuple<Number, NonNullable<T>> */> & LuaIterator<dynamic /* JsTuple<Number, NonNullable<T>> */, undefined> & LuaExtension<String /* "__luaIterableBrand" */> */
|
||||
|
||||
external fun next(table: Any?,
|
||||
index: Any = definedExternally): dynamic /* JsTuple<Any, Any> | JsTuple<> */
|
||||
|
||||
external fun <TKey : AnyNotNil, TValue> pairs(
|
||||
t: LuaTable<TKey, TValue>): Iterable<dynamic /* JsTuple<TKey, NonNullable<TValue>> */> /* Iterable<dynamic /* JsTuple<TKey, NonNullable<TValue>> */> & LuaIterator<dynamic /* JsTuple<TKey, NonNullable<TValue>> */, undefined> & LuaExtension<String /* "__luaIterableBrand" */> */
|
||||
|
||||
external fun <T> pairs(
|
||||
t: T): Iterable<dynamic /* JsTuple<Any, NonNullable<Any>> */> /* Iterable<dynamic /* JsTuple<Any, NonNullable<Any>> */> & LuaIterator<dynamic /* JsTuple<Any, NonNullable<Any>> */, undefined> & LuaExtension<String /* "__luaIterableBrand" */> */
|
||||
|
||||
external fun <This, Args : Array<Any>, R> pcall(f: (self: This, args: Args) -> R, context: This,
|
||||
vararg args: Args): dynamic /* JsTuple<Boolean, R> | JsTuple<Boolean, String> */
|
||||
|
||||
external fun <A : Array<Any>, R> pcall(f: (self: Unit, args: A) -> R,
|
||||
vararg args: A): dynamic /* JsTuple<Boolean, R> | JsTuple<Boolean, String> */
|
||||
|
||||
external fun print(vararg args: Any)
|
||||
|
||||
external fun <T> rawequal(v1: T, v2: T): Boolean
|
||||
|
||||
external fun <T : Any?, K : Any> rawget(table: T, index: K): Any
|
||||
|
||||
external fun rawlen(v: Any?): Number
|
||||
|
||||
external fun rawlen(v: String?): Number
|
||||
|
||||
external fun <T : Any?, K : Any> rawset(table: T, index: K, value: Any): T
|
||||
|
||||
external fun <T> select(index: Number,
|
||||
vararg args: T): Array<T> /* Array<T> & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
|
||||
external fun <T> select(index: String /* "#" */, vararg args: T): Number
|
||||
|
||||
external fun <T : Any?, TIndex> setmetatable(table: T,
|
||||
metatable: LuaMetatable<T, TIndex>? = definedExternally): Any
|
||||
|
||||
external fun tonumber(e: Any, base: Number = definedExternally): Number?
|
||||
|
||||
external fun tostring(v: Any): String
|
||||
|
||||
external fun type(
|
||||
v: Any): String /* "nil" | "number" | "string" | "boolean" | "table" | "function" | "thread" | "userdata" */
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Record
|
||||
import tsstdlib.Iterable
|
||||
|
||||
typealias AnyTable = Record<Any, Any>
|
||||
|
||||
external interface AnyNotNil
|
||||
|
||||
typealias LuaExtension<TBrand> = Any
|
||||
|
||||
//external var `$multi`: (values: T) -> T /* (values: T) -> T & LuaExtension<String /* "__luaMultiFunctionBrand" */> */
|
||||
external fun <T> `$multi`(values: T): T /* (values: T) -> T & LuaExtension<String /* "__luaMultiFunctionBrand" */> */
|
||||
|
||||
external var `$range`: (start: Number, limit: Number, step: Number) -> Iterable<Number> /* (start: Number, limit: Number, step: Number) -> Iterable<Number> & LuaExtension<String /* "__luaRangeFunctionBrand" */> */
|
||||
|
||||
external var `$vararg`: Array<String> /* Array<String> & LuaExtension<String /* "__luaVarargConstantBrand" */> */
|
||||
|
||||
typealias LuaIterator<TValue, TState> = Any
|
||||
|
||||
@Suppress("EXTERNAL_DELEGATION", "NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
external interface LuaTable<TKey : AnyNotNil, TValue> {
|
||||
var length: () -> Number /* () -> Number & LuaExtension<String /* "__luaLengthMethodBrand" */> */
|
||||
var get: (key: TKey) -> TValue /* (key: TKey) -> TValue & LuaExtension<String /* "__luaTableGetMethodBrand" */> */
|
||||
var set: (key: TKey, value: TValue) -> Unit /* (key: TKey, value: TValue) -> Unit & LuaExtension<String /* "__luaTableSetMethodBrand" */> */
|
||||
var has: (key: TKey) -> Boolean /* (key: TKey) -> Boolean & LuaExtension<String /* "__luaTableHasMethodBrand" */> */
|
||||
var delete: (key: TKey) -> Boolean /* (key: TKey) -> Boolean & LuaExtension<String /* "__luaTableDeleteMethodBrand" */> */
|
||||
|
||||
// companion object : Any by definedExternally
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Iterable
|
||||
import io.FileReadFormatToType
|
||||
|
||||
external interface LuaFile {
|
||||
fun close(): Boolean
|
||||
fun flush(): Boolean
|
||||
fun <T : Array<dynamic /* "*n" | "*l" | "*a" | "*L" | Number */>> lines(vararg formats: T): Iterable<Any /* Any & LuaExtension<String /* "__luaMultiReturnBrand" */> */> /* Iterable<Any /* Any & LuaExtension<String /* "__luaMultiReturnBrand" */> */> & LuaIterator<Any /* Any & LuaExtension<String /* "__luaMultiReturnBrand" */> */, undefined> & LuaExtension<String /* "__luaIterableBrand" */> */
|
||||
fun read(): FileReadFormatToType<String /* "*l" */>?
|
||||
fun <T> read(format: T): FileReadFormatToType<T>? /* Any & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
fun seek(whence: String /* "set" | "cur" | "end" */ = definedExternally, offset: Number = definedExternally): dynamic /* JsTuple<Number> | JsTuple<Nothing?, String> */
|
||||
fun setvbuf(mode: String /* "no" | "full" | "line" */, size: Number = definedExternally)
|
||||
fun write(vararg args: Any /* String | Number */): dynamic /* JsTuple<LuaFile> | JsTuple<Nothing?, String> */
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
@file:JsQualifier("io")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package io
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import LuaFile
|
||||
import tsstdlib.Iterable
|
||||
|
||||
external fun close(file: LuaFile = definedExternally): Boolean
|
||||
|
||||
external fun flush(): Boolean
|
||||
|
||||
external fun input(file: String = definedExternally): LuaFile
|
||||
|
||||
external fun input(): LuaFile
|
||||
|
||||
external fun input(file: LuaFile = definedExternally): LuaFile
|
||||
|
||||
external fun <T : Array<dynamic /* "*n" | "*l" | "*a" | "*L" | Number */>> lines(filename: String = definedExternally, vararg formats: T): Iterable<Any /* Any & LuaExtension<String /* "__luaMultiReturnBrand" */> */> /* Iterable<Any /* Any & LuaExtension<String /* "__luaMultiReturnBrand" */> */> & LuaIterator<Any /* Any & LuaExtension<String /* "__luaMultiReturnBrand" */> */, undefined> & LuaExtension<String /* "__luaIterableBrand" */> */
|
||||
|
||||
external fun open(filename: String, mode: String = definedExternally): dynamic /* JsTuple<LuaFile> | JsTuple<Nothing?, String, Number> */
|
||||
|
||||
external fun output(file: String = definedExternally): LuaFile
|
||||
|
||||
external fun output(): LuaFile
|
||||
|
||||
external fun output(file: LuaFile = definedExternally): LuaFile
|
||||
|
||||
external fun popen(prog: String, mode: String /* "r" | "w" */ = definedExternally): dynamic /* JsTuple<LuaFile> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun read(): FileReadFormatToType<String /* "*l" */>?
|
||||
|
||||
external fun <T> read(format: T): FileReadFormatToType<T>? /* Any & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
|
||||
external var stderr: LuaFile
|
||||
|
||||
external var stdin: LuaFile
|
||||
|
||||
external var stdout: LuaFile
|
||||
|
||||
external fun tmpfile(): LuaFile
|
||||
|
||||
external fun type(obj: Any): String /* "file" | "closed file" */
|
||||
|
||||
external fun write(vararg args: Any /* String | Number */): dynamic /* JsTuple<LuaFile> | JsTuple<Nothing?, String> */
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package io
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
typealias FileReadFormatToType<T> = Any
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface `T$95` {
|
||||
var tag: String
|
||||
var head: String
|
||||
var body: String
|
||||
var tail: String
|
||||
var level: Number
|
||||
}
|
||||
|
||||
external interface SerpentOptions {
|
||||
var indent: String
|
||||
var comment: dynamic /* Boolean | Number */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sortkeys: dynamic /* Boolean | (this: Unit, keys: Array<Any>, table: Any) -> Unit */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sparse: Boolean?
|
||||
var compact: Boolean?
|
||||
var fatal: Boolean?
|
||||
var nocode: Boolean?
|
||||
var nohuge: Boolean?
|
||||
var maxlevel: Number
|
||||
var maxnum: Number
|
||||
var maxlength: Number
|
||||
var metatostring: Boolean?
|
||||
var numformat: String
|
||||
var valignore: Array<String>
|
||||
var keyallow: Array<String>
|
||||
var keyignore: Array<String>
|
||||
var valtypeignore: Array<String>
|
||||
fun custom(opts: `T$95`): String
|
||||
var name: String
|
||||
var refcomment: dynamic /* Boolean | Number */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var tablecomment: dynamic /* Boolean | Number */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface SerpentOptionsPartial {
|
||||
var indent: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var comment: dynamic /* Boolean? | Number? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sortkeys: dynamic /* Boolean? | ((this: Unit, keys: Array<Any>, table: Any) -> Unit)? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sparse: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var compact: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var fatal: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var nocode: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var nohuge: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var maxlevel: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var maxnum: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var maxlength: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var metatostring: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var numformat: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var valignore: Array<String>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var keyallow: Array<String>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var keyignore: Array<String>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var valtypeignore: Array<String>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var custom: ((opts: `T$95`) -> String)?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var name: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var refcomment: dynamic /* Boolean? | Number? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var tablecomment: dynamic /* Boolean? | Number? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun log(ls: Any /* JsTuple<String, Any> */)
|
||||
|
||||
external fun log(ls: String)
|
||||
|
||||
external fun log(ls: Number)
|
||||
|
||||
external fun localised_print(ls: Any /* JsTuple<String, Any> */)
|
||||
|
||||
external fun localised_print(ls: String)
|
||||
|
||||
external fun localised_print(ls: Number)
|
||||
|
||||
external fun table_size(tbl: table): Number
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
@file:JsQualifier("math")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package math
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external fun abs(x: Number): Number
|
||||
|
||||
external fun acos(x: Number): Number
|
||||
|
||||
external fun asin(x: Number): Number
|
||||
|
||||
external fun ceil(x: Number): Number
|
||||
|
||||
external fun cos(x: Number): Number
|
||||
|
||||
external fun deg(x: Number): Number
|
||||
|
||||
external fun exp(x: Number): Number
|
||||
|
||||
external fun floor(x: Number): Number
|
||||
|
||||
external fun fmod(x: Number, y: Number): Number
|
||||
|
||||
external var huge: Number
|
||||
|
||||
external fun max(x: Number, vararg numbers: Number): Number
|
||||
|
||||
external fun min(x: Number, vararg numbers: Number): Number
|
||||
|
||||
external fun modf(x: Number): dynamic /* JsTuple<Number, Number> */
|
||||
|
||||
external var pi: Number
|
||||
|
||||
external fun rad(x: Number): Number
|
||||
|
||||
external fun sin(x: Number): Number
|
||||
|
||||
external fun sqrt(x: Number): Number
|
||||
|
||||
external fun tan(x: Number): Number
|
||||
|
||||
external fun log(x: Number, base: Number = definedExternally): Number
|
||||
|
||||
external fun atan(x: Number): Number
|
||||
|
||||
external fun atan2(y: Number, x: Number): Number
|
||||
|
||||
external fun cosh(x: Number): Number
|
||||
|
||||
external fun frexp(x: Number): Number
|
||||
|
||||
external fun ldexp(m: Number, e: Number): Number
|
||||
|
||||
external fun pow(x: Number, y: Number): Number
|
||||
|
||||
external fun sinh(x: Number): Number
|
||||
|
||||
external fun tanh(x: Number): Number
|
||||
|
||||
external fun random(m: Number = definedExternally, n: Number = definedExternally): Number
|
||||
|
||||
external fun randomseed(x: Number): Number
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface LuaMetatable<T, TIndex> {
|
||||
// val <T> __pairs: ((t: T) -> dynamic)?
|
||||
// val <T : Any?> __ipairs: ((t: T) -> dynamic)?
|
||||
fun <T> __pairs(t: T): dynamic
|
||||
fun <T : Any?> __ipairs(t: T): dynamic
|
||||
val __add: ((operand: Any) -> Any)?
|
||||
val __sub: ((operand: Any) -> Any)?
|
||||
val __mul: ((operand: Any) -> Any)?
|
||||
val __div: ((operand: Any) -> Any)?
|
||||
val __mod: ((operand: Any) -> Any)?
|
||||
val __pow: ((operand: Any) -> Any)?
|
||||
val __unm: ((operand: Any) -> Any)?
|
||||
val __concat: ((operand: Any) -> Any)?
|
||||
val __len: (() -> Any)?
|
||||
val __eq: ((operand: Any) -> Boolean)?
|
||||
val __lt: ((operand: Any) -> Boolean)?
|
||||
val __le: ((operand: Any) -> Boolean)?
|
||||
var __index: TIndex?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var __newindex: dynamic /* Any? | ((this: T, key: Any, value: Any) -> Unit)? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
val __call: ((args: Any) -> Any)?
|
||||
val __tostring: (() -> String)?
|
||||
var __mode: String? /* "k" | "v" | "kv" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var __metatable: Any?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
val __gc: (() -> Unit)?
|
||||
}
|
||||
|
||||
external interface LuaMetatable__1<T> : LuaMetatable<T, dynamic /* Any? | ((this: T, key: Any) -> Any)? */>
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
@file:JsModule("mod-gui")
|
||||
@file:JsNonModule
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package mod_gui
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import LuaPlayer
|
||||
import FrameGuiElementMembers
|
||||
import FlowGuiElementMembers
|
||||
|
||||
external var button_style: String
|
||||
|
||||
external var frame_style: String
|
||||
|
||||
external fun get_button_flow(player: LuaPlayer): FrameGuiElementMembers /* FrameGuiElementMembers & GuiElementIndex */
|
||||
|
||||
external fun get_frame_flow(player: LuaPlayer): FlowGuiElementMembers /* FlowGuiElementMembers & GuiElementIndex */
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external fun require(modname: String): Any
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface LuaDateInfo {
|
||||
var year: Number
|
||||
var month: Number
|
||||
var day: Number
|
||||
var hour: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var min: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sec: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var isdst: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface LuaDateInfoResult {
|
||||
var year: Number
|
||||
var month: Number
|
||||
var day: Number
|
||||
var hour: Number
|
||||
var min: Number
|
||||
var sec: Number
|
||||
var isdst: Boolean?
|
||||
var yday: Number
|
||||
var wday: Number
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
@file:JsQualifier("os")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package os
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import LuaDateInfo
|
||||
|
||||
external fun clock(): Number
|
||||
|
||||
external fun date(format: String /* "*t" */ = definedExternally, time: Number = definedExternally): dynamic /* String | LuaDateInfoResult */
|
||||
|
||||
external fun date(): String
|
||||
|
||||
external fun date(format: String /* "*t" */ = definedExternally): dynamic /* String | LuaDateInfoResult */
|
||||
|
||||
external fun difftime(t1: Number, t2: Number): Number
|
||||
|
||||
external fun getenv(varname: String): String?
|
||||
|
||||
external fun remove(filename: String): dynamic /* JsTuple<Boolean> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun rename(oldname: String, newname: String): dynamic /* JsTuple<Boolean> | JsTuple<Nothing?, String> */
|
||||
|
||||
external fun setlocale(locale: String = definedExternally, category: String /* "all" | "collate" | "ctype" | "monetary" | "numeric" | "time" */ = definedExternally): String?
|
||||
|
||||
external fun time(): Number
|
||||
|
||||
external fun time(table: LuaDateInfo): Number
|
||||
|
||||
external fun tmpname(): String
|
||||
|
||||
external fun execute(): Boolean
|
||||
|
||||
external fun execute(command: String): dynamic /* JsTuple<Boolean?, String, Number> */
|
||||
|
||||
external fun exit(code: Boolean = definedExternally, close: Boolean = definedExternally): Any
|
||||
|
||||
external fun exit(): Any
|
||||
|
||||
external fun exit(code: Boolean = definedExternally): Any
|
||||
|
||||
external fun exit(code: Number = definedExternally, close: Boolean = definedExternally): Any
|
||||
|
||||
external fun exit(code: Number = definedExternally): Any
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
@file:JsQualifier("package")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package `package`
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Record
|
||||
|
||||
external var config: String
|
||||
|
||||
external var cpath: String
|
||||
|
||||
external var loaded: Record<String, Any>
|
||||
|
||||
external fun loadlib(libname: String, funcname: String): dynamic /* JsTuple<Function<*>> | JsTuple<Nothing?, String, String> */
|
||||
|
||||
external var path: String
|
||||
|
||||
external var preload: Record<String, (modname: String, fileName: String) -> Any>
|
||||
|
||||
external fun searchpath(name: String, path: String, sep: String = definedExternally, rep: String = definedExternally): String
|
||||
|
||||
external var searchers: Array<dynamic /* (modname: String) -> dynamic | (modname: String) -> dynamic | String */>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Iterable
|
||||
|
||||
external fun <V> pairs(table: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex<dynamic /* Number | String */, V> */): Iterable<dynamic /* JsTuple<Number, V> */> /* Iterable<dynamic /* JsTuple<Number, V> */> & LuaIterator<dynamic /* JsTuple<Number, V> */, undefined> & LuaExtension<String /* "__luaIterableBrand" */> */
|
||||
|
||||
external fun <K : Any, V> pairs(table: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex<K, V> */): Iterable<dynamic /* JsTuple<K, V> */> /* Iterable<dynamic /* JsTuple<K, V> */> & LuaIterator<dynamic /* JsTuple<K, V> */, undefined> & LuaExtension<String /* "__luaIterableBrand" */> */
|
||||
|
||||
external fun ipairs(table: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex<Any, Any> */): Any
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
@file:JsQualifier("serpent")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package serpent
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import SerpentOptionsPartial
|
||||
|
||||
external fun dump(tbl: Any, options: SerpentOptionsPartial = definedExternally): String
|
||||
|
||||
external fun line(tbl: Any, options: SerpentOptionsPartial = definedExternally): String
|
||||
|
||||
external fun block(tbl: Any, options: SerpentOptionsPartial = definedExternally): String
|
||||
|
||||
external interface `T$96` {
|
||||
var safe: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun <T> load(str: String, options: `T$96` = definedExternally): dynamic /* JsTuple<Boolean, T> | JsTuple<Boolean, String> */
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
@file:JsQualifier("string")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package string
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Iterable
|
||||
import tsstdlib.Record
|
||||
|
||||
external fun byte(s: String, i: Number = definedExternally): dynamic /* Number | Array */
|
||||
|
||||
external fun byte(s: String): dynamic /* Number | Array */
|
||||
|
||||
external fun byte(s: String, i: Number = definedExternally, j: Number = definedExternally): Array<Number> /* Array<Number> & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
|
||||
external fun char(vararg args: Number): String
|
||||
|
||||
external fun dump(func: Function<*>): String
|
||||
|
||||
external fun find(s: String, pattern: String, init: Number = definedExternally, plain: Boolean = definedExternally): dynamic /* JsTuple<Number, Number, Any> | JsTuple<> */
|
||||
|
||||
external fun format(formatstring: String, vararg args: Any): String
|
||||
|
||||
external fun gmatch(s: String, pattern: String): Iterable<Array<String> /* Array<String> & LuaExtension<String /* "__luaMultiReturnBrand" */> */> /* Iterable<Array<String> /* Array<String> & LuaExtension<String /* "__luaMultiReturnBrand" */> */> & LuaIterator<Array<String> /* Array<String> & LuaExtension<String /* "__luaMultiReturnBrand" */> */, undefined> & LuaExtension<String /* "__luaIterableBrand" */> */
|
||||
|
||||
external fun gsub(s: String, pattern: String, repl: String, n: Number = definedExternally): dynamic /* JsTuple<String, Number> */
|
||||
|
||||
external fun gsub(s: String, pattern: String, repl: String): dynamic /* JsTuple<String, Number> */
|
||||
|
||||
external fun gsub(s: String, pattern: String, repl: Record<String, String>, n: Number = definedExternally): dynamic /* JsTuple<String, Number> */
|
||||
|
||||
external fun gsub(s: String, pattern: String, repl: Record<String, String>): dynamic /* JsTuple<String, Number> */
|
||||
|
||||
external fun gsub(s: String, pattern: String, repl: (matches: String) -> String, n: Number = definedExternally): dynamic /* JsTuple<String, Number> */
|
||||
|
||||
external fun gsub(s: String, pattern: String, repl: (matches: String) -> String): dynamic /* JsTuple<String, Number> */
|
||||
|
||||
external fun len(s: String): Number
|
||||
|
||||
external fun lower(s: String): String
|
||||
|
||||
external fun match(s: String, pattern: String, init: Number = definedExternally): Array<String> /* Array<String> & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
|
||||
external fun rep(s: String, n: Number): String
|
||||
|
||||
external fun reverse(s: String): String
|
||||
|
||||
external fun sub(s: String, i: Number, j: Number = definedExternally): String
|
||||
|
||||
external fun upper(s: String): String
|
||||
|
||||
external fun rep(s: String, n: Number, sep: String = definedExternally): String
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
@file:JsQualifier("table")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package table2
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external fun concat(list: Array<Any /* String | Number */>, sep: String = definedExternally, i: Number = definedExternally, j: Number = definedExternally): String
|
||||
|
||||
external fun <T> insert(list: Array<T>, value: T)
|
||||
|
||||
external fun <T> insert(list: Array<T>, pos: Number, value: T)
|
||||
|
||||
external fun <T> remove(list: Array<T>, pos: Number = definedExternally): T?
|
||||
|
||||
external fun <T> sort(list: Array<T>, comp: (a: T, b: T) -> Boolean = definedExternally)
|
||||
|
||||
external fun <T : Array<Any>> unpack(list: T): T /* T & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
|
||||
external fun <T> unpack(list: Array<T>, i: Number, j: Number = definedExternally): Array<T> /* Array<T> & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
|
||||
external fun <T> unpack(list: Array<T>, i: Number): Array<T> /* Array<T> & LuaExtension<String /* "__luaMultiReturnBrand" */> */
|
||||
|
||||
external interface `T$92` {
|
||||
var n: Number
|
||||
}
|
||||
|
||||
external fun <T : Array<Any>> pack(vararg args: T): T /* T & `T$92` */
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package tsstdlib
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface Coordinates {
|
||||
var accuracy: Number
|
||||
var altitude: Number?
|
||||
var altitudeAccuracy: Number?
|
||||
var heading: Number?
|
||||
var latitude: Number
|
||||
var longitude: Number
|
||||
var speed: Number?
|
||||
}
|
||||
|
||||
external interface Position {
|
||||
var coords: Coordinates
|
||||
var timestamp: Number
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package tsstdlib
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface IteratorYieldResult<TYield> {
|
||||
var done: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var value: TYield
|
||||
}
|
||||
|
||||
external interface IteratorReturnResult<TReturn> {
|
||||
var done: Boolean?
|
||||
var value: TReturn
|
||||
}
|
||||
|
||||
external interface Iterator<T, TReturn, TNext> {
|
||||
fun next(vararg args: Any /* JsTuple<> | JsTuple<TNext> */): dynamic /* IteratorYieldResult<T> | IteratorReturnResult<TReturn> */
|
||||
val `return`: ((value: TReturn) -> dynamic)?
|
||||
val `throw`: ((e: Any) -> dynamic)?
|
||||
}
|
||||
|
||||
typealias Iterator__1<T> = Iterator<T, Any, Nothing?>
|
||||
|
||||
external interface Iterable<T>
|
||||
|
||||
external interface IterableIterator<T> : Iterator__1<T>
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package tsstdlib
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface FunctionConstructor {
|
||||
@nativeInvoke
|
||||
operator fun invoke(vararg args: String): Function<*>
|
||||
var prototype: Function<*>
|
||||
}
|
||||
|
||||
external interface ConcatArray<T> {
|
||||
var length: Number
|
||||
@nativeGetter
|
||||
operator fun get(n: Number): T?
|
||||
@nativeSetter
|
||||
operator fun set(n: Number, value: T)
|
||||
fun join(separator: String = definedExternally): String
|
||||
fun slice(start: Number = definedExternally, end: Number = definedExternally): Array<T>
|
||||
}
|
||||
|
||||
external interface ArrayConstructor {
|
||||
fun <T> from(iterable: Iterable<T>): Array<T>
|
||||
fun <T> from(iterable: ArrayLike<T>): Array<T>
|
||||
fun <T, U> from(iterable: Iterable<T>, mapfn: (v: T, k: Number) -> U, thisArg: Any = definedExternally): Array<U>
|
||||
fun <T, U> from(iterable: Iterable<T>, mapfn: (v: T, k: Number) -> U): Array<U>
|
||||
fun <T, U> from(iterable: ArrayLike<T>, mapfn: (v: T, k: Number) -> U, thisArg: Any = definedExternally): Array<U>
|
||||
fun <T, U> from(iterable: ArrayLike<T>, mapfn: (v: T, k: Number) -> U): Array<U>
|
||||
fun <T> of(vararg items: T): Array<T>
|
||||
@nativeInvoke
|
||||
operator fun invoke(arrayLength: Number = definedExternally): Array<Any>
|
||||
@nativeInvoke
|
||||
operator fun invoke(): Array<Any>
|
||||
@nativeInvoke
|
||||
operator fun <T> invoke(arrayLength: Number): Array<T>
|
||||
@nativeInvoke
|
||||
operator fun <T> invoke(vararg items: T): Array<T>
|
||||
fun isArray(arg: Any): Boolean
|
||||
var prototype: Array<Any>
|
||||
}
|
||||
|
||||
external interface ArrayLike<T> {
|
||||
var length: Number
|
||||
@nativeGetter
|
||||
operator fun get(n: Number): T?
|
||||
@nativeSetter
|
||||
operator fun set(n: Number, value: T)
|
||||
}
|
||||
|
||||
typealias Partial<T> = Any
|
||||
|
||||
typealias Pick<T, K> = Any
|
||||
|
||||
@Deprecated("use Kotlin Wrapper", ReplaceWith("kotlinext.js.Record<K, T>"))
|
||||
typealias Record<K, T> = kotlinext.js.Record<K, T>
|
||||
|
||||
|
||||
typealias Exclude<T, U> = Any
|
||||
|
||||
typealias Extract<T, U> = Any
|
||||
|
||||
typealias Omit<T, K> = Any
|
||||
|
||||
typealias NonNullable<T> = Any
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Record
|
||||
|
||||
external interface BaseSettingDefinition {
|
||||
var type: String /* "bool-setting" | "int-setting" | "double-setting" | "string-setting" */
|
||||
var name: String
|
||||
var localized_name: dynamic /* JsTuple<String, Any> | String? | Number? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var localized_description: dynamic /* JsTuple<String, Any> | String? | Number? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var order: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var hidden: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var setting_type: String /* "startup" | "runtime-global" | "runtime-per-user" */
|
||||
}
|
||||
|
||||
external interface BoolSettingDefinition : BaseSettingDefinition {
|
||||
override var type: String /* "bool-setting" */
|
||||
var default_value: Boolean?
|
||||
var forced_value: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface IntSettingDefinition : BaseSettingDefinition {
|
||||
override var type: String /* "int-setting" */
|
||||
var default_value: Number
|
||||
var minimum_value: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var maximum_value: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var allowed_values: Array<Number>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface DoubleSettingDefinition : BaseSettingDefinition {
|
||||
override var type: String /* "double-setting" */
|
||||
var default_value: Number
|
||||
var minimum_value: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var maximum_value: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var allowed_values: Array<Number>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface StringSettingDefinition : BaseSettingDefinition {
|
||||
override var type: String /* "string-setting" */
|
||||
var default_value: String
|
||||
var allow_blank: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var auto_trim: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var allowed_values: Array<String>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface Data {
|
||||
var raw: Any
|
||||
fun extend(prototypes: Array<Any /* BoolSettingDefinition | IntSettingDefinition | DoubleSettingDefinition | StringSettingDefinition */>)
|
||||
}
|
||||
|
||||
typealias Mods = Record<String, String>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
@file:JsQualifier("util.table")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package util.table
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external fun <T> deepcopy(table: T): T
|
||||
|
||||
external fun <T> compare(tb1: T, tb2: T): Boolean
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
@file:JsModule("util")
|
||||
@file:JsNonModule
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package util
|
||||
|
||||
import AnyNotNil
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Position
|
||||
import ColorTable
|
||||
import defines.direction
|
||||
import LuaEntity
|
||||
import tsstdlib.Record
|
||||
import LuaTable
|
||||
|
||||
external fun <T> copy(table: T): T
|
||||
|
||||
external fun distance(position1: Position, position2: Position): Number
|
||||
|
||||
external fun positiontostr(position: Position): String
|
||||
|
||||
external fun formattime(ticks: Number): String
|
||||
|
||||
external fun color(hex: String): ColorTable
|
||||
|
||||
external fun premul_color(color: ColorTable): ColorTable
|
||||
|
||||
external fun premul_color(color: Any /* JsTuple<Any, float, Any, float, Any, float, Any, float> */): ColorTable
|
||||
|
||||
external fun mix_color(c1: ColorTable, c2: ColorTable): dynamic /* JsTuple<Any, float, Any, float, Any, float, Any, float> */
|
||||
|
||||
external fun mix_color(c1: ColorTable, c2: Any /* JsTuple<Any, float, Any, float, Any, float, Any, float> */): dynamic /* JsTuple<Any, float, Any, float, Any, float, Any, float> */
|
||||
|
||||
external fun mix_color(c1: Any /* JsTuple<Any, float, Any, float, Any, float, Any, float> */, c2: ColorTable): dynamic /* JsTuple<Any, float, Any, float, Any, float, Any, float> */
|
||||
|
||||
external fun mix_color(c1: Any /* JsTuple<Any, float, Any, float, Any, float, Any, float> */, c2: Any /* JsTuple<Any, float, Any, float, Any, float, Any, float> */): dynamic /* JsTuple<Any, float, Any, float, Any, float, Any, float> */
|
||||
|
||||
external fun multiply_color(c1: ColorTable, n: Number): dynamic /* JsTuple<Any, float, Any, float, Any, float, Any, float> */
|
||||
|
||||
external fun multiply_color(c1: Any /* JsTuple<Any, float, Any, float, Any, float, Any, float> */, n: Number): dynamic /* JsTuple<Any, float, Any, float, Any, float, Any, float> */
|
||||
|
||||
external fun moveposition(position: Position, direction: defines.direction, distance: Number): Position?
|
||||
//external fun moveposition(position: Position, direction: defines.direction.north, distance: Number): Position
|
||||
//external fun moveposition(position: Position, direction: defines.direction.east, distance: Number): Position
|
||||
//external fun moveposition(position: Position, direction: defines.direction.south, distance: Number): Position
|
||||
//external fun moveposition(position: Position, direction: defines.direction.west, distance: Number): Position
|
||||
|
||||
//external fun moveposition(position: Position, direction: direction, distance: Number): Position?
|
||||
|
||||
external fun oppositedirection(direction: direction): direction
|
||||
|
||||
external fun <T> multiplystripes(count: Number, stripes: Array<T>): Array<T>
|
||||
|
||||
external fun by_pixel(x: Number, y: Number): Position
|
||||
|
||||
external fun by_pixel_hr(x: Number, y: Number): Position
|
||||
|
||||
external fun add_shift(a: Any /* JsTuple<x, int, y, int> */, b: Any /* JsTuple<x, int, y, int> */): dynamic /* JsTuple<x, int, y, int> */
|
||||
|
||||
external fun mul_shift(shift: Any /* JsTuple<x, int, y, int> */, scale: Number?): dynamic /* JsTuple<x, int, y, int> */
|
||||
|
||||
external fun format_number(amount: Number, append_suffix: Boolean = definedExternally): String
|
||||
|
||||
external fun increment(t: Array<Number>, index: Number, v: Number = definedExternally)
|
||||
|
||||
external fun <T : Any?> merge(tables: Array<T>): T
|
||||
|
||||
external fun insert_safe(entity: LuaEntity?, item_dict: Record<String, Number>?)
|
||||
|
||||
external fun remove_safe(entity: LuaEntity?, item_dict: Record<String, Number>?)
|
||||
|
||||
external fun split_whitespace(string: String): Array<String>
|
||||
|
||||
external fun clamp(x: Number, lower: Number, upper: Number): Number
|
||||
|
||||
external fun parse_energy(energy: String): Number
|
||||
|
||||
external interface `T$97` {
|
||||
var probability: Number
|
||||
}
|
||||
|
||||
external interface `T$98` {
|
||||
var amount: Number
|
||||
}
|
||||
|
||||
external interface `T$99` {
|
||||
var amount_min: Number
|
||||
var amount_max: Number
|
||||
}
|
||||
|
||||
external fun product_amount(product: `T$97` /* `T$97` & dynamic */): Number
|
||||
|
||||
external fun empty_sprite(): Any?
|
||||
|
||||
external fun <T> remove_from_list(list: Array<T>, value: T): Boolean
|
||||
|
||||
external fun <T : Any> list_to_map(list: Array<T>): dynamic /* Record | LuaTable */
|
||||
|
||||
external fun <T> list_to_map(list: T): LuaTable<AnyNotNil, Boolean>
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.CompilerOptions
|
||||
import ts.Diagnostic
|
||||
|
||||
typealias OmitIndexSignature<T> = Any
|
||||
|
||||
external interface TransformerImport {
|
||||
var transform: String
|
||||
var import: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var after: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var afterDeclarations: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var type: String? /* "program" | "config" | "checker" | "raw" | "compilerOptions" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@nativeGetter
|
||||
operator fun get(option: String): Any?
|
||||
@nativeSetter
|
||||
operator fun set(option: String, value: Any)
|
||||
}
|
||||
|
||||
external interface LuaPluginImport {
|
||||
var name: String
|
||||
var import: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@nativeGetter
|
||||
operator fun get(option: String): Any?
|
||||
@nativeSetter
|
||||
operator fun set(option: String, value: Any)
|
||||
}
|
||||
|
||||
external enum class LuaLibImportKind {
|
||||
None /* = "none" */,
|
||||
Always /* = "always" */,
|
||||
Inline /* = "inline" */,
|
||||
Require /* = "require" */
|
||||
}
|
||||
|
||||
external enum class LuaTarget {
|
||||
Universal /* = "universal" */,
|
||||
Lua51 /* = "5.1" */,
|
||||
Lua52 /* = "5.2" */,
|
||||
Lua53 /* = "5.3" */,
|
||||
Lua54 /* = "5.4" */,
|
||||
LuaJIT /* = "JIT" */
|
||||
}
|
||||
|
||||
external enum class BuildMode {
|
||||
Default /* = "default" */,
|
||||
Library /* = "library" */
|
||||
}
|
||||
|
||||
external var isBundleEnabled: (options: OmitIndexSignature<CompilerOptions> /* OmitIndexSignature<ts.CompilerOptions> & `T$0` */) -> Boolean
|
||||
|
||||
external fun validateOptions(options: OmitIndexSignature<CompilerOptions> /* OmitIndexSignature<ts.CompilerOptions> & `T$0` */): Array<Diagnostic>
|
||||
|
|
@ -1,485 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import tsstdlib.Set
|
||||
|
||||
external enum class SyntaxKind {
|
||||
File /* = 0 */,
|
||||
Block /* = 1 */,
|
||||
DoStatement /* = 2 */,
|
||||
VariableDeclarationStatement /* = 3 */,
|
||||
AssignmentStatement /* = 4 */,
|
||||
IfStatement /* = 5 */,
|
||||
WhileStatement /* = 6 */,
|
||||
RepeatStatement /* = 7 */,
|
||||
ForStatement /* = 8 */,
|
||||
ForInStatement /* = 9 */,
|
||||
GotoStatement /* = 10 */,
|
||||
LabelStatement /* = 11 */,
|
||||
ReturnStatement /* = 12 */,
|
||||
BreakStatement /* = 13 */,
|
||||
ExpressionStatement /* = 14 */,
|
||||
StringLiteral /* = 15 */,
|
||||
NumericLiteral /* = 16 */,
|
||||
NilKeyword /* = 17 */,
|
||||
DotsKeyword /* = 18 */,
|
||||
TrueKeyword /* = 19 */,
|
||||
FalseKeyword /* = 20 */,
|
||||
FunctionExpression /* = 21 */,
|
||||
TableFieldExpression /* = 22 */,
|
||||
TableExpression /* = 23 */,
|
||||
UnaryExpression /* = 24 */,
|
||||
BinaryExpression /* = 25 */,
|
||||
CallExpression /* = 26 */,
|
||||
MethodCallExpression /* = 27 */,
|
||||
Identifier /* = 28 */,
|
||||
TableIndexExpression /* = 29 */,
|
||||
AdditionOperator /* = 30 */,
|
||||
SubtractionOperator /* = 31 */,
|
||||
MultiplicationOperator /* = 32 */,
|
||||
DivisionOperator /* = 33 */,
|
||||
FloorDivisionOperator /* = 34 */,
|
||||
ModuloOperator /* = 35 */,
|
||||
PowerOperator /* = 36 */,
|
||||
NegationOperator /* = 37 */,
|
||||
ConcatOperator /* = 38 */,
|
||||
LengthOperator /* = 39 */,
|
||||
EqualityOperator /* = 40 */,
|
||||
InequalityOperator /* = 41 */,
|
||||
LessThanOperator /* = 42 */,
|
||||
LessEqualOperator /* = 43 */,
|
||||
GreaterThanOperator /* = 44 */,
|
||||
GreaterEqualOperator /* = 45 */,
|
||||
AndOperator /* = 46 */,
|
||||
OrOperator /* = 47 */,
|
||||
NotOperator /* = 48 */,
|
||||
BitwiseAndOperator /* = 49 */,
|
||||
BitwiseOrOperator /* = 50 */,
|
||||
BitwiseExclusiveOrOperator /* = 51 */,
|
||||
BitwiseRightShiftOperator /* = 52 */,
|
||||
BitwiseLeftShiftOperator /* = 53 */,
|
||||
BitwiseNotOperator /* = 54 */
|
||||
}
|
||||
|
||||
typealias UnaryBitwiseOperator = SyntaxKind.BitwiseNotOperator
|
||||
|
||||
external interface TextRange {
|
||||
var line: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var column: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface Node : TextRange {
|
||||
var kind: SyntaxKind
|
||||
}
|
||||
|
||||
external fun createNode(kind: SyntaxKind, tsOriginal: ts.Node = definedExternally): Node
|
||||
|
||||
external fun <T : Node> cloneNode(node: T): T
|
||||
|
||||
external fun <T : Node> setNodePosition(node: T, position: TextRange): T
|
||||
|
||||
external fun <T : Node> setNodeOriginal(node: T, tsOriginal: ts.Node): T
|
||||
|
||||
external fun <T : Node> setNodeOriginal(node: T?, tsOriginal: ts.Node): T?
|
||||
|
||||
external fun getOriginalPos(node: Node): TextRange
|
||||
|
||||
external interface File : Node {
|
||||
var statements: Array<Statement>
|
||||
var luaLibFeatures: Set<LuaLibFeature>
|
||||
var trivia: String
|
||||
}
|
||||
|
||||
external fun isFile(node: Node): Boolean
|
||||
|
||||
external fun createFile(statements: Array<Statement>, luaLibFeatures: Set<LuaLibFeature>, trivia: String, tsOriginal: ts.Node = definedExternally): File
|
||||
|
||||
external interface Block : Node {
|
||||
var statements: Array<Statement>
|
||||
}
|
||||
|
||||
external fun isBlock(node: Node): Boolean
|
||||
|
||||
external fun createBlock(statements: Array<Statement>, tsOriginal: ts.Node = definedExternally): Block
|
||||
|
||||
external interface Statement : Node {
|
||||
var _statementBrand: Any
|
||||
var leadingComments: Array<dynamic /* String | Array<String> */>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var trailingComments: Array<dynamic /* String | Array<String> */>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface DoStatement : Statement {
|
||||
var statements: Array<Statement>
|
||||
}
|
||||
|
||||
external fun isDoStatement(node: Node): Boolean
|
||||
|
||||
external fun createDoStatement(statements: Array<Statement>, tsOriginal: ts.Node = definedExternally): DoStatement
|
||||
|
||||
external interface VariableDeclarationStatement : Statement {
|
||||
var left: Array<Identifier>
|
||||
var right: Array<Expression>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isVariableDeclarationStatement(node: Node): Boolean
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Identifier, right: Expression = definedExternally, tsOriginal: ts.Node = definedExternally): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Identifier): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Identifier, right: Expression = definedExternally): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Identifier, right: Array<Expression> = definedExternally, tsOriginal: ts.Node = definedExternally): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Identifier, right: Array<Expression> = definedExternally): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Array<Identifier>, right: Expression = definedExternally, tsOriginal: ts.Node = definedExternally): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Array<Identifier>): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Array<Identifier>, right: Expression = definedExternally): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Array<Identifier>, right: Array<Expression> = definedExternally, tsOriginal: ts.Node = definedExternally): VariableDeclarationStatement
|
||||
|
||||
external fun createVariableDeclarationStatement(left: Array<Identifier>, right: Array<Expression> = definedExternally): VariableDeclarationStatement
|
||||
|
||||
external interface AssignmentStatement : Statement {
|
||||
var left: Array<dynamic /* Identifier | TableIndexExpression */>
|
||||
var right: Array<Expression>
|
||||
}
|
||||
|
||||
external fun isAssignmentStatement(node: Node): Boolean
|
||||
|
||||
external fun createAssignmentStatement(left: Identifier, right: Expression = definedExternally, tsOriginal: ts.Node = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Identifier): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Identifier, right: Expression = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Identifier, right: Array<Expression> = definedExternally, tsOriginal: ts.Node = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Identifier, right: Array<Expression> = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: TableIndexExpression, right: Expression = definedExternally, tsOriginal: ts.Node = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: TableIndexExpression): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: TableIndexExpression, right: Expression = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: TableIndexExpression, right: Array<Expression> = definedExternally, tsOriginal: ts.Node = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: TableIndexExpression, right: Array<Expression> = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Array<Any /* Identifier | TableIndexExpression */>, right: Expression = definedExternally, tsOriginal: ts.Node = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Array<Any /* Identifier | TableIndexExpression */>): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Array<Any /* Identifier | TableIndexExpression */>, right: Expression = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Array<Any /* Identifier | TableIndexExpression */>, right: Array<Expression> = definedExternally, tsOriginal: ts.Node = definedExternally): AssignmentStatement
|
||||
|
||||
external fun createAssignmentStatement(left: Array<Any /* Identifier | TableIndexExpression */>, right: Array<Expression> = definedExternally): AssignmentStatement
|
||||
|
||||
external interface IfStatement : Statement {
|
||||
var condition: Expression
|
||||
var ifBlock: Block
|
||||
var elseBlock: dynamic /* Block? | IfStatement? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isIfStatement(node: Node): Boolean
|
||||
|
||||
external fun createIfStatement(condition: Expression, ifBlock: Block, elseBlock: Block = definedExternally, tsOriginal: ts.Node = definedExternally): IfStatement
|
||||
|
||||
external fun createIfStatement(condition: Expression, ifBlock: Block): IfStatement
|
||||
|
||||
external fun createIfStatement(condition: Expression, ifBlock: Block, elseBlock: Block = definedExternally): IfStatement
|
||||
|
||||
external fun createIfStatement(condition: Expression, ifBlock: Block, elseBlock: IfStatement = definedExternally, tsOriginal: ts.Node = definedExternally): IfStatement
|
||||
|
||||
external fun createIfStatement(condition: Expression, ifBlock: Block, elseBlock: IfStatement = definedExternally): IfStatement
|
||||
|
||||
external interface IterationStatement : Statement {
|
||||
var body: Block
|
||||
}
|
||||
|
||||
external fun isIterationStatement(node: Node): Boolean
|
||||
|
||||
external interface WhileStatement : IterationStatement {
|
||||
var condition: Expression
|
||||
}
|
||||
|
||||
external fun isWhileStatement(node: Node): Boolean
|
||||
|
||||
external fun createWhileStatement(body: Block, condition: Expression, tsOriginal: ts.Node = definedExternally): WhileStatement
|
||||
|
||||
external interface RepeatStatement : IterationStatement {
|
||||
var condition: Expression
|
||||
}
|
||||
|
||||
external fun isRepeatStatement(node: Node): Boolean
|
||||
|
||||
external fun createRepeatStatement(body: Block, condition: Expression, tsOriginal: ts.Node = definedExternally): RepeatStatement
|
||||
|
||||
external interface ForStatement : IterationStatement {
|
||||
var controlVariable: Identifier
|
||||
var controlVariableInitializer: Expression
|
||||
var limitExpression: Expression
|
||||
var stepExpression: Expression?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isForStatement(node: Node): Boolean
|
||||
|
||||
external fun createForStatement(body: Block, controlVariable: Identifier, controlVariableInitializer: Expression, limitExpression: Expression, stepExpression: Expression = definedExternally, tsOriginal: ts.Node = definedExternally): ForStatement
|
||||
|
||||
external interface ForInStatement : IterationStatement {
|
||||
var names: Array<Identifier>
|
||||
var expressions: Array<Expression>
|
||||
}
|
||||
|
||||
external fun isForInStatement(node: Node): Boolean
|
||||
|
||||
external fun createForInStatement(body: Block, names: Array<Identifier>, expressions: Array<Expression>, tsOriginal: ts.Node = definedExternally): ForInStatement
|
||||
|
||||
external interface GotoStatement : Statement {
|
||||
var label: String
|
||||
}
|
||||
|
||||
external fun isGotoStatement(node: Node): Boolean
|
||||
|
||||
external fun createGotoStatement(label: String, tsOriginal: ts.Node = definedExternally): GotoStatement
|
||||
|
||||
external interface LabelStatement : Statement {
|
||||
var name: String
|
||||
}
|
||||
|
||||
external fun isLabelStatement(node: Node): Boolean
|
||||
|
||||
external fun createLabelStatement(name: String, tsOriginal: ts.Node = definedExternally): LabelStatement
|
||||
|
||||
external interface ReturnStatement : Statement {
|
||||
var expressions: Array<Expression>
|
||||
}
|
||||
|
||||
external fun isReturnStatement(node: Node): Boolean
|
||||
|
||||
external fun createReturnStatement(expressions: Array<Expression>, tsOriginal: ts.Node = definedExternally): ReturnStatement
|
||||
|
||||
external interface BreakStatement : Statement
|
||||
|
||||
external fun isBreakStatement(node: Node): Boolean
|
||||
|
||||
external fun createBreakStatement(tsOriginal: ts.Node = definedExternally): BreakStatement
|
||||
|
||||
external interface ExpressionStatement : Statement {
|
||||
var expression: Expression
|
||||
}
|
||||
|
||||
external fun isExpressionStatement(node: Node): Boolean
|
||||
|
||||
external fun createExpressionStatement(expressions: Expression, tsOriginal: ts.Node = definedExternally): ExpressionStatement
|
||||
|
||||
external interface Expression : Node {
|
||||
var _expressionBrand: Any
|
||||
}
|
||||
|
||||
external interface NilLiteral : Expression
|
||||
|
||||
external fun isNilLiteral(node: Node): Boolean
|
||||
|
||||
external fun createNilLiteral(tsOriginal: ts.Node = definedExternally): NilLiteral
|
||||
|
||||
external interface BooleanLiteral : Expression {
|
||||
override var kind: dynamic /* SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isBooleanLiteral(node: Node): Boolean
|
||||
|
||||
external fun createBooleanLiteral(value: Boolean, tsOriginal: ts.Node = definedExternally): BooleanLiteral
|
||||
|
||||
external interface DotsLiteral : Expression
|
||||
|
||||
external fun isDotsLiteral(node: Node): Boolean
|
||||
|
||||
external fun createDotsLiteral(tsOriginal: ts.Node = definedExternally): DotsLiteral
|
||||
|
||||
external interface NumericLiteral : Expression {
|
||||
var value: Number
|
||||
}
|
||||
|
||||
external fun isNumericLiteral(node: Node): Boolean
|
||||
|
||||
external fun createNumericLiteral(value: Number, tsOriginal: ts.Node = definedExternally): NumericLiteral
|
||||
|
||||
external interface StringLiteral : Expression {
|
||||
var value: String
|
||||
}
|
||||
|
||||
external fun isStringLiteral(node: Node): Boolean
|
||||
|
||||
external fun createStringLiteral(value: String, tsOriginal: ts.Node = definedExternally): StringLiteral
|
||||
|
||||
external enum class FunctionExpressionFlags {
|
||||
None /* = 1 */,
|
||||
Inline /* = 2 */,
|
||||
Declaration /* = 4 */
|
||||
}
|
||||
|
||||
external interface FunctionExpression : Expression {
|
||||
var params: Array<Identifier>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var dots: DotsLiteral?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var body: Block
|
||||
var flags: FunctionExpressionFlags
|
||||
}
|
||||
|
||||
external fun isFunctionExpression(node: Node): Boolean
|
||||
|
||||
external fun createFunctionExpression(body: Block, params: Array<Identifier> = definedExternally, dots: DotsLiteral = definedExternally, flags: FunctionExpressionFlags = definedExternally, tsOriginal: ts.Node = definedExternally): FunctionExpression
|
||||
|
||||
external interface TableFieldExpression : Expression {
|
||||
var value: Expression
|
||||
var key: Expression?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isTableFieldExpression(node: Node): Boolean
|
||||
|
||||
external fun createTableFieldExpression(value: Expression, key: Expression = definedExternally, tsOriginal: ts.Node = definedExternally): TableFieldExpression
|
||||
|
||||
external interface TableExpression : Expression {
|
||||
var fields: Array<TableFieldExpression>
|
||||
}
|
||||
|
||||
external fun isTableExpression(node: Node): Boolean
|
||||
|
||||
external fun createTableExpression(fields: Array<TableFieldExpression> = definedExternally, tsOriginal: ts.Node = definedExternally): TableExpression
|
||||
|
||||
external interface UnaryExpression : Expression {
|
||||
var operand: Expression
|
||||
var operator: dynamic /* SyntaxKind.NegationOperator | SyntaxKind.LengthOperator | SyntaxKind.NotOperator | UnaryBitwiseOperator */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isUnaryExpression(node: Node): Boolean
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: SyntaxKind.NegationOperator, tsOriginal: ts.Node = definedExternally): UnaryExpression
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: SyntaxKind.NegationOperator): UnaryExpression
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: SyntaxKind.LengthOperator, tsOriginal: ts.Node = definedExternally): UnaryExpression
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: SyntaxKind.LengthOperator): UnaryExpression
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: SyntaxKind.NotOperator, tsOriginal: ts.Node = definedExternally): UnaryExpression
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: SyntaxKind.NotOperator): UnaryExpression
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: UnaryBitwiseOperator, tsOriginal: ts.Node = definedExternally): UnaryExpression
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: UnaryBitwiseOperator): UnaryExpression
|
||||
|
||||
external interface BinaryExpression : Expression {
|
||||
var operator: dynamic /* SyntaxKind.AdditionOperator | SyntaxKind.SubtractionOperator | SyntaxKind.MultiplicationOperator | SyntaxKind.DivisionOperator | SyntaxKind.FloorDivisionOperator | SyntaxKind.ModuloOperator | SyntaxKind.PowerOperator | SyntaxKind.ConcatOperator | SyntaxKind.EqualityOperator | SyntaxKind.InequalityOperator | SyntaxKind.LessThanOperator | SyntaxKind.LessEqualOperator | SyntaxKind.GreaterThanOperator | SyntaxKind.GreaterEqualOperator | SyntaxKind.AndOperator | SyntaxKind.OrOperator | SyntaxKind.BitwiseAndOperator | SyntaxKind.BitwiseOrOperator | SyntaxKind.BitwiseExclusiveOrOperator | SyntaxKind.BitwiseRightShiftOperator | SyntaxKind.BitwiseLeftShiftOperator */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var left: Expression
|
||||
var right: Expression
|
||||
}
|
||||
|
||||
external fun isBinaryExpression(node: Node): Boolean
|
||||
|
||||
external fun createBinaryExpression(left: Expression, right: Expression, operator: Any /* SyntaxKind.AdditionOperator | SyntaxKind.SubtractionOperator | SyntaxKind.MultiplicationOperator | SyntaxKind.DivisionOperator | SyntaxKind.FloorDivisionOperator | SyntaxKind.ModuloOperator | SyntaxKind.PowerOperator | SyntaxKind.ConcatOperator | SyntaxKind.EqualityOperator | SyntaxKind.InequalityOperator | SyntaxKind.LessThanOperator | SyntaxKind.LessEqualOperator | SyntaxKind.GreaterThanOperator | SyntaxKind.GreaterEqualOperator | SyntaxKind.AndOperator | SyntaxKind.OrOperator | SyntaxKind.BitwiseAndOperator | SyntaxKind.BitwiseOrOperator | SyntaxKind.BitwiseExclusiveOrOperator | SyntaxKind.BitwiseRightShiftOperator | SyntaxKind.BitwiseLeftShiftOperator */, tsOriginal: ts.Node = definedExternally): BinaryExpression
|
||||
|
||||
external interface CallExpression : Expression {
|
||||
var expression: Expression
|
||||
var params: Array<Expression>
|
||||
}
|
||||
|
||||
external fun isCallExpression(node: Node): Boolean
|
||||
|
||||
external fun createCallExpression(expression: Expression, params: Array<Expression>, tsOriginal: ts.Node = definedExternally): CallExpression
|
||||
|
||||
external interface MethodCallExpression : Expression {
|
||||
var prefixExpression: Expression
|
||||
var name: Identifier
|
||||
var params: Array<Expression>
|
||||
}
|
||||
|
||||
external fun isMethodCallExpression(node: Node): Boolean
|
||||
|
||||
external fun createMethodCallExpression(prefixExpression: Expression, name: Identifier, params: Array<Expression>, tsOriginal: ts.Node = definedExternally): MethodCallExpression
|
||||
|
||||
external interface Identifier : Expression {
|
||||
var exportable: Boolean
|
||||
var text: String
|
||||
var originalName: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var symbolId: Number? /* Number? & `T$14`? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isIdentifier(node: Node): Boolean
|
||||
|
||||
external fun createIdentifier(text: String, tsOriginal: ts.Node = definedExternally, symbolId: Number /* Number & `T$14` */ = definedExternally, originalName: String = definedExternally): Identifier
|
||||
|
||||
external fun cloneIdentifier(identifier: Identifier, tsOriginal: ts.Node = definedExternally): Identifier
|
||||
|
||||
external fun createAnonymousIdentifier(tsOriginal: ts.Node = definedExternally): Identifier
|
||||
|
||||
external interface TableIndexExpression : Expression {
|
||||
var table: Expression
|
||||
var index: Expression
|
||||
}
|
||||
|
||||
external fun isTableIndexExpression(node: Node): Boolean
|
||||
|
||||
external fun createTableIndexExpression(table: Expression, index: Expression, tsOriginal: ts.Node = definedExternally): TableIndexExpression
|
||||
|
||||
external fun isAssignmentLeftHandSideExpression(node: Node): Boolean
|
||||
|
||||
external fun isFunctionDefinition(statement: VariableDeclarationStatement): Boolean
|
||||
|
||||
external fun isFunctionDefinition(statement: AssignmentStatement): Boolean
|
||||
|
||||
external interface `T$17` {
|
||||
var statements: dynamic /* JsTuple<ReturnStatement> */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isInlineFunctionExpression(expression: FunctionExpression): Boolean
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external enum class LuaLibFeature {
|
||||
ArrayConcat /* = "ArrayConcat" */,
|
||||
ArrayEntries /* = "ArrayEntries" */,
|
||||
ArrayEvery /* = "ArrayEvery" */,
|
||||
ArrayFilter /* = "ArrayFilter" */,
|
||||
ArrayForEach /* = "ArrayForEach" */,
|
||||
ArrayFind /* = "ArrayFind" */,
|
||||
ArrayFindIndex /* = "ArrayFindIndex" */,
|
||||
ArrayIncludes /* = "ArrayIncludes" */,
|
||||
ArrayIndexOf /* = "ArrayIndexOf" */,
|
||||
ArrayIsArray /* = "ArrayIsArray" */,
|
||||
ArrayJoin /* = "ArrayJoin" */,
|
||||
ArrayMap /* = "ArrayMap" */,
|
||||
ArrayPush /* = "ArrayPush" */,
|
||||
ArrayReduce /* = "ArrayReduce" */,
|
||||
ArrayReduceRight /* = "ArrayReduceRight" */,
|
||||
ArrayReverse /* = "ArrayReverse" */,
|
||||
ArrayShift /* = "ArrayShift" */,
|
||||
ArrayUnshift /* = "ArrayUnshift" */,
|
||||
ArraySort /* = "ArraySort" */,
|
||||
ArraySlice /* = "ArraySlice" */,
|
||||
ArraySome /* = "ArraySome" */,
|
||||
ArraySplice /* = "ArraySplice" */,
|
||||
ArrayToObject /* = "ArrayToObject" */,
|
||||
ArrayFlat /* = "ArrayFlat" */,
|
||||
ArrayFlatMap /* = "ArrayFlatMap" */,
|
||||
ArraySetLength /* = "ArraySetLength" */,
|
||||
Await /* = "Await" */,
|
||||
Class /* = "Class" */,
|
||||
ClassExtends /* = "ClassExtends" */,
|
||||
CloneDescriptor /* = "CloneDescriptor" */,
|
||||
Decorate /* = "Decorate" */,
|
||||
DecorateParam /* = "DecorateParam" */,
|
||||
Delete /* = "Delete" */,
|
||||
DelegatedYield /* = "DelegatedYield" */,
|
||||
Error /* = "Error" */,
|
||||
FunctionBind /* = "FunctionBind" */,
|
||||
Generator /* = "Generator" */,
|
||||
InstanceOf /* = "InstanceOf" */,
|
||||
InstanceOfObject /* = "InstanceOfObject" */,
|
||||
Iterator /* = "Iterator" */,
|
||||
Map /* = "Map" */,
|
||||
MathAtan2 /* = "MathAtan2" */,
|
||||
New /* = "New" */,
|
||||
Number /* = "Number" */,
|
||||
NumberIsFinite /* = "NumberIsFinite" */,
|
||||
NumberIsNaN /* = "NumberIsNaN" */,
|
||||
NumberToString /* = "NumberToString" */,
|
||||
ObjectAssign /* = "ObjectAssign" */,
|
||||
ObjectDefineProperty /* = "ObjectDefineProperty" */,
|
||||
ObjectEntries /* = "ObjectEntries" */,
|
||||
ObjectFromEntries /* = "ObjectFromEntries" */,
|
||||
ObjectGetOwnPropertyDescriptor /* = "ObjectGetOwnPropertyDescriptor" */,
|
||||
ObjectGetOwnPropertyDescriptors /* = "ObjectGetOwnPropertyDescriptors" */,
|
||||
ObjectKeys /* = "ObjectKeys" */,
|
||||
ObjectRest /* = "ObjectRest" */,
|
||||
ObjectValues /* = "ObjectValues" */,
|
||||
OptionalChainAccess /* = "OptionalChainAccess" */,
|
||||
OptionalFunctionCall /* = "OptionalFunctionCall" */,
|
||||
OptionalMethodCall /* = "OptionalMethodCall" */,
|
||||
ParseFloat /* = "ParseFloat" */,
|
||||
ParseInt /* = "ParseInt" */,
|
||||
Promise /* = "Promise" */,
|
||||
PromiseAll /* = "PromiseAll" */,
|
||||
PromiseAllSettled /* = "PromiseAllSettled" */,
|
||||
PromiseAny /* = "PromiseAny" */,
|
||||
PromiseRace /* = "PromiseRace" */,
|
||||
Set /* = "Set" */,
|
||||
SetDescriptor /* = "SetDescriptor" */,
|
||||
WeakMap /* = "WeakMap" */,
|
||||
WeakSet /* = "WeakSet" */,
|
||||
SourceMapTraceBack /* = "SourceMapTraceBack" */,
|
||||
Spread /* = "Spread" */,
|
||||
StringAccess /* = "StringAccess" */,
|
||||
StringCharAt /* = "StringCharAt" */,
|
||||
StringCharCodeAt /* = "StringCharCodeAt" */,
|
||||
StringConcat /* = "StringConcat" */,
|
||||
StringEndsWith /* = "StringEndsWith" */,
|
||||
StringIncludes /* = "StringIncludes" */,
|
||||
StringPadEnd /* = "StringPadEnd" */,
|
||||
StringPadStart /* = "StringPadStart" */,
|
||||
StringReplace /* = "StringReplace" */,
|
||||
StringSlice /* = "StringSlice" */,
|
||||
StringSplit /* = "StringSplit" */,
|
||||
StringStartsWith /* = "StringStartsWith" */,
|
||||
StringSubstr /* = "StringSubstr" */,
|
||||
StringSubstring /* = "StringSubstring" */,
|
||||
StringTrim /* = "StringTrim" */,
|
||||
StringTrimEnd /* = "StringTrimEnd" */,
|
||||
StringTrimStart /* = "StringTrimStart" */,
|
||||
Symbol /* = "Symbol" */,
|
||||
SymbolRegistry /* = "SymbolRegistry" */,
|
||||
TypeOf /* = "TypeOf" */,
|
||||
Unpack /* = "Unpack" */
|
||||
}
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.Program
|
||||
|
||||
external var escapeString: (value: String) -> String
|
||||
|
||||
external var tstlHeader: Any
|
||||
|
||||
typealias Printer = (program: Program, emitHost: EmitHost, fileName: String, file: File) -> PrintResult
|
||||
|
||||
external interface PrintResult {
|
||||
var code: String
|
||||
var sourceMap: String
|
||||
var sourceMapNode: SourceNode
|
||||
}
|
||||
|
||||
external fun createPrinter(printers: Array<Printer>): Printer
|
||||
|
||||
external open class LuaPrinter(emitHost: EmitHost, program: Program, fileName: String) {
|
||||
open var emitHost: Any
|
||||
open var currentIndent: Any
|
||||
open var sourceFile: Any
|
||||
open var options: Any
|
||||
open fun print(file: File): PrintResult
|
||||
open var printInlineSourceMap: Any
|
||||
open var printStackTraceOverride: Any
|
||||
open var printFile: Any
|
||||
open fun pushIndent()
|
||||
open fun popIndent()
|
||||
open fun indent(input: String = definedExternally): dynamic /* String | SourceNode */
|
||||
open fun indent(): dynamic /* String | SourceNode */
|
||||
open fun indent(input: SourceNode = definedExternally): dynamic /* String | SourceNode */
|
||||
open fun createSourceNode(node: Node, chunks: String, name: String = definedExternally): SourceNode
|
||||
open fun createSourceNode(node: Node, chunks: String): SourceNode
|
||||
open fun createSourceNode(node: Node, chunks: SourceNode, name: String = definedExternally): SourceNode
|
||||
open fun createSourceNode(node: Node, chunks: SourceNode): SourceNode
|
||||
open fun createSourceNode(node: Node, chunks: Array<Any /* String | SourceNode */>, name: String = definedExternally): SourceNode
|
||||
open fun createSourceNode(node: Node, chunks: Array<Any /* String | SourceNode */>): SourceNode
|
||||
open fun concatNodes(vararg chunks: Any /* String | SourceNode */): SourceNode
|
||||
open fun printBlock(block: Block): SourceNode
|
||||
open var statementMayRequireSemiColon: Any
|
||||
open var nodeStartsWithParenthesis: Any
|
||||
open fun printStatementArray(statements: Array<Statement>): Array<dynamic /* String | SourceNode */>
|
||||
open fun printStatement(statement: Statement): SourceNode
|
||||
open fun printComment(comment: String): dynamic /* String | SourceNode */
|
||||
open fun printComment(comment: Array<String>): dynamic /* String | SourceNode */
|
||||
open fun printStatementExcludingComments(statement: Statement): SourceNode
|
||||
open fun printDoStatement(statement: DoStatement): SourceNode
|
||||
open fun printVariableDeclarationStatement(statement: VariableDeclarationStatement): SourceNode
|
||||
open fun printVariableAssignmentStatement(statement: AssignmentStatement): SourceNode
|
||||
open fun printIfStatement(statement: IfStatement, isElseIf: Boolean = definedExternally): SourceNode
|
||||
open fun printWhileStatement(statement: WhileStatement): SourceNode
|
||||
open fun printRepeatStatement(statement: RepeatStatement): SourceNode
|
||||
open fun printForStatement(statement: ForStatement): SourceNode
|
||||
open fun printForInStatement(statement: ForInStatement): SourceNode
|
||||
open fun printGotoStatement(statement: GotoStatement): SourceNode
|
||||
open fun printLabelStatement(statement: LabelStatement): SourceNode
|
||||
open fun printReturnStatement(statement: ReturnStatement): SourceNode
|
||||
open fun printBreakStatement(statement: BreakStatement): SourceNode
|
||||
open fun printExpressionStatement(statement: ExpressionStatement): SourceNode
|
||||
open fun printExpression(expression: Expression): SourceNode
|
||||
open fun printStringLiteral(expression: StringLiteral): SourceNode
|
||||
open fun printNumericLiteral(expression: NumericLiteral): SourceNode
|
||||
open fun printNilLiteral(expression: NilLiteral): SourceNode
|
||||
open fun printDotsLiteral(expression: DotsLiteral): SourceNode
|
||||
open fun printBooleanLiteral(expression: BooleanLiteral): SourceNode
|
||||
open var printFunctionParameters: Any
|
||||
open fun printFunctionExpression(expression: FunctionExpression): SourceNode
|
||||
open fun printFunctionDefinition(statement: Any /* VariableDeclarationStatement | AssignmentStatement */): SourceNode
|
||||
open fun printTableFieldExpression(expression: TableFieldExpression): SourceNode
|
||||
open fun printTableExpression(expression: TableExpression): SourceNode
|
||||
open fun printUnaryExpression(expression: UnaryExpression): SourceNode
|
||||
open fun printBinaryExpression(expression: BinaryExpression): SourceNode
|
||||
open var printExpressionInParenthesesIfNeeded: Any
|
||||
open var needsParenthesis: Any
|
||||
open fun printCallExpression(expression: CallExpression): SourceNode
|
||||
open fun printMethodCallExpression(expression: MethodCallExpression): SourceNode
|
||||
open fun printIdentifier(expression: Identifier): SourceNode
|
||||
open fun printTableIndexExpression(expression: TableIndexExpression): SourceNode
|
||||
open fun printOperator(kind: Any /* SyntaxKind.NegationOperator | SyntaxKind.LengthOperator | SyntaxKind.NotOperator | UnaryBitwiseOperator | SyntaxKind.AdditionOperator | SyntaxKind.SubtractionOperator | SyntaxKind.MultiplicationOperator | SyntaxKind.DivisionOperator | SyntaxKind.FloorDivisionOperator | SyntaxKind.ModuloOperator | SyntaxKind.PowerOperator | SyntaxKind.ConcatOperator | SyntaxKind.EqualityOperator | SyntaxKind.InequalityOperator | SyntaxKind.LessThanOperator | SyntaxKind.LessEqualOperator | SyntaxKind.GreaterThanOperator | SyntaxKind.GreaterEqualOperator | SyntaxKind.AndOperator | SyntaxKind.OrOperator | SyntaxKind.BitwiseAndOperator | SyntaxKind.BitwiseOrOperator | SyntaxKind.BitwiseExclusiveOrOperator | SyntaxKind.BitwiseRightShiftOperator | SyntaxKind.BitwiseLeftShiftOperator */): SourceNode
|
||||
open fun joinChunksWithComma(chunks: Array<Any /* String | SourceNode */>): Array<dynamic /* String | SourceNode */>
|
||||
open fun printExpressionList(expressions: Array<Expression>): Array<dynamic /* String | SourceNode */>
|
||||
open var buildSourceMap: Any
|
||||
|
||||
companion object {
|
||||
var operatorMap: Any
|
||||
}
|
||||
}
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.GetAccessorDeclaration
|
||||
import ts.SetAccessorDeclaration
|
||||
import ts.Node
|
||||
import ts.ImportEqualsDeclaration
|
||||
import ts.Expression
|
||||
import ts.SourceFile
|
||||
import ts.CancellationToken
|
||||
import ts.TypeChecker
|
||||
import ts.Program
|
||||
import ts.Diagnostic
|
||||
import ts.CompilerOptions
|
||||
import Node as _Node
|
||||
import Expression as _Expression
|
||||
import ts.QualifiedName
|
||||
import ts.ExternalModuleReference
|
||||
|
||||
external interface AllAccessorDeclarations {
|
||||
var firstAccessor: dynamic /* GetAccessorDeclaration | SetAccessorDeclaration */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var secondAccessor: dynamic /* GetAccessorDeclaration? | SetAccessorDeclaration? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var getAccessor: GetAccessorDeclaration?
|
||||
var setAccessor: SetAccessorDeclaration?
|
||||
}
|
||||
|
||||
external interface EmitResolver {
|
||||
fun isValueAliasDeclaration(node: Node): Boolean
|
||||
fun isReferencedAliasDeclaration(node: Node, checkChildren: Boolean = definedExternally): Boolean
|
||||
fun isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): Boolean
|
||||
fun moduleExportsSomeValue(moduleReferenceExpression: Expression): Boolean
|
||||
fun getAllAccessorDeclarations(declaration: GetAccessorDeclaration): AllAccessorDeclarations
|
||||
fun getAllAccessorDeclarations(declaration: SetAccessorDeclaration): AllAccessorDeclarations
|
||||
}
|
||||
|
||||
external interface DiagnosticsProducingTypeChecker : TypeChecker {
|
||||
fun getEmitResolver(sourceFile: SourceFile = definedExternally, cancellationToken: CancellationToken = definedExternally): EmitResolver
|
||||
}
|
||||
|
||||
external open class TransformationContext(program: Program, sourceFile: SourceFile, visitorMap: VisitorMap) {
|
||||
open var program: Program
|
||||
open var sourceFile: SourceFile
|
||||
open var visitorMap: Any
|
||||
open var diagnostics: Array<Diagnostic>
|
||||
open var checker: DiagnosticsProducingTypeChecker
|
||||
open var resolver: EmitResolver
|
||||
open var options: OmitIndexSignature<CompilerOptions> /* OmitIndexSignature<ts.CompilerOptions> & `T$0` */
|
||||
open var luaTarget: LuaTarget
|
||||
open var isModule: Boolean
|
||||
open var isStrict: Boolean
|
||||
open var currentNodeVisitors: Any
|
||||
open fun transformNode(node: Node): Array<_Node>
|
||||
open fun superTransformNode(node: Node): Array<_Node>
|
||||
open fun transformExpression(node: Expression): _Expression
|
||||
open fun transformExpression(node: QualifiedName): _Expression
|
||||
open fun transformExpression(node: ExternalModuleReference): _Expression
|
||||
open fun superTransformExpression(node: Expression): _Expression
|
||||
open fun superTransformExpression(node: QualifiedName): _Expression
|
||||
open fun superTransformExpression(node: ExternalModuleReference): _Expression
|
||||
open fun transformStatements(node: StatementLikeNode): Array<Statement>
|
||||
open fun transformStatements(node: Array<StatementLikeNode>): Array<Statement>
|
||||
open fun superTransformStatements(node: StatementLikeNode): Array<Statement>
|
||||
open fun superTransformStatements(node: Array<StatementLikeNode>): Array<Statement>
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.CompilerOptions
|
||||
import ts.WriteFileCallback
|
||||
import ts.Diagnostic
|
||||
import tsstdlib.Record
|
||||
|
||||
external fun transpileFiles(rootNames: Array<String>, options: OmitIndexSignature<CompilerOptions> /* OmitIndexSignature<ts.CompilerOptions> & `T$0` */ = definedExternally, writeFile: WriteFileCallback = definedExternally): EmitResult
|
||||
|
||||
external fun transpileProject(configFileName: String, optionsToExtend: OmitIndexSignature<CompilerOptions> /* OmitIndexSignature<ts.CompilerOptions> & `T$0` */ = definedExternally, writeFile: WriteFileCallback = definedExternally): EmitResult
|
||||
|
||||
external interface TranspileVirtualProjectResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var transpiledFiles: Array<TranspiledFile>
|
||||
}
|
||||
|
||||
external fun transpileVirtualProject(files: Record<String, String>, options: OmitIndexSignature<CompilerOptions> /* OmitIndexSignature<ts.CompilerOptions> & `T$0` */ = definedExternally): TranspileVirtualProjectResult
|
||||
|
||||
external interface TranspileStringResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var file: TranspiledFile?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun transpileString(main: String, options: OmitIndexSignature<CompilerOptions> /* OmitIndexSignature<ts.CompilerOptions> & `T$0` */ = definedExternally): TranspileStringResult
|
||||
49
modules/mod2/externals/lib.es2015.collection.kt
vendored
49
modules/mod2/externals/lib.es2015.collection.kt
vendored
|
|
@ -1,49 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package tsstdlib
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface Map<K, V> {
|
||||
fun entries(): IterableIterator<dynamic /* JsTuple<K, V> */>
|
||||
fun keys(): IterableIterator<K>
|
||||
fun values(): IterableIterator<V>
|
||||
fun clear()
|
||||
fun delete(key: K): Boolean
|
||||
fun forEach(callbackfn: (value: V, key: K, map: Map<K, V>) -> Unit, thisArg: Any = definedExternally)
|
||||
fun get(key: K): V?
|
||||
fun has(key: K): Boolean
|
||||
fun set(key: K, value: V): Map<K, V> /* this */
|
||||
var size: Number
|
||||
}
|
||||
|
||||
external interface MapConstructor {
|
||||
var prototype: Map<Any, Any>
|
||||
}
|
||||
|
||||
external interface Set<T> {
|
||||
fun entries(): IterableIterator<dynamic /* JsTuple<T, T> */>
|
||||
fun keys(): IterableIterator<T>
|
||||
fun values(): IterableIterator<T>
|
||||
fun add(value: T): Set<T> /* this */
|
||||
fun clear()
|
||||
fun delete(value: T): Boolean
|
||||
fun forEach(callbackfn: (value: T, value2: T, set: Set<T>) -> Unit, thisArg: Any = definedExternally)
|
||||
fun has(value: T): Boolean
|
||||
var size: Number
|
||||
}
|
||||
|
||||
external interface SetConstructor {
|
||||
var prototype: Set<Any>
|
||||
}
|
||||
54
modules/mod2/externals/lib.es2015.iterable.kt
vendored
54
modules/mod2/externals/lib.es2015.iterable.kt
vendored
|
|
@ -1,54 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package tsstdlib
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface IteratorYieldResult<TYield> {
|
||||
var done: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var value: TYield
|
||||
}
|
||||
|
||||
external interface IteratorReturnResult<TReturn> {
|
||||
var done: Boolean
|
||||
var value: TReturn
|
||||
}
|
||||
|
||||
external interface Iterator<T, TReturn, TNext> {
|
||||
fun next(vararg args: Any /* JsTuple<> | JsTuple<TNext> */): dynamic /* IteratorYieldResult<T> | IteratorReturnResult<TReturn> */
|
||||
val `return`: ((value: TReturn) -> dynamic)?
|
||||
val `throw`: ((e: Any) -> dynamic)?
|
||||
}
|
||||
|
||||
typealias Iterator__1<T> = Iterator<T, Any, Nothing?>
|
||||
|
||||
external interface Iterable<T>
|
||||
|
||||
external interface IterableIterator<T> : Iterator__1<T>
|
||||
|
||||
external interface PromiseConstructor {
|
||||
var prototype: Promise<Any>
|
||||
fun all(values: Any /* JsTuple<Any?, Any?, Any?, Any?, Any?, Any?, Any?, Any?, Any?, Any?> | JsTuple<Any?, Any?, Any?, Any?, Any?, Any?, Any?, Any?, Any?> | JsTuple<Any?, Any?, Any?, Any?, Any?, Any?, Any?, Any?> | JsTuple<Any?, Any?, Any?, Any?, Any?, Any?, Any?> | JsTuple<Any?, Any?, Any?, Any?, Any?, Any?> | JsTuple<Any?, Any?, Any?, Any?, Any?> | JsTuple<Any?, Any?, Any?, Any?> | JsTuple<Any?, Any?, Any?> | JsTuple<Any?, Any?> */): Promise<dynamic /* JsTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> | JsTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> | JsTuple<T1, T2, T3, T4, T5, T6, T7, T8> | JsTuple<T1, T2, T3, T4, T5, T6, T7> | JsTuple<T1, T2, T3, T4, T5, T6> | JsTuple<T1, T2, T3, T4, T5> | JsTuple<T1, T2, T3, T4> | JsTuple<T1, T2, T3> | JsTuple<T1, T2> */>
|
||||
fun <T> all(values: Array<Any? /* T | PromiseLike<T> */>): Promise<Array<T>>
|
||||
fun <T> race(values: Array<T>): Promise<Any>
|
||||
fun <T> reject(reason: Any = definedExternally): Promise<T>
|
||||
fun <T> resolve(value: T): Promise<T>
|
||||
fun <T> resolve(value: PromiseLike<T>): Promise<T>
|
||||
fun resolve(): Promise<Unit>
|
||||
fun <T> all(values: Iterable<Any? /* T | PromiseLike<T> */>): Promise<Array<T>>
|
||||
fun <T> race(values: Iterable<T>): Promise<Any>
|
||||
fun <T> race(values: Iterable<Any? /* T | PromiseLike<T> */>): Promise<T>
|
||||
}
|
||||
220
modules/mod2/externals/lib.es5.Intl.module_dukat.kt
vendored
220
modules/mod2/externals/lib.es5.Intl.module_dukat.kt
vendored
|
|
@ -1,220 +0,0 @@
|
|||
@file:JsQualifier("tsstdlib.Intl")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package tsstdlib.Intl
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface CollatorOptions {
|
||||
var usage: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var localeMatcher: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var numeric: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var caseFirst: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sensitivity: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var ignorePunctuation: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface ResolvedCollatorOptions {
|
||||
var locale: String
|
||||
var usage: String
|
||||
var sensitivity: String
|
||||
var ignorePunctuation: Boolean
|
||||
var collation: String
|
||||
var caseFirst: String
|
||||
var numeric: Boolean
|
||||
}
|
||||
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
external interface Collator {
|
||||
fun compare(x: String, y: String): Number
|
||||
fun resolvedOptions(): ResolvedCollatorOptions
|
||||
|
||||
companion object {
|
||||
@nativeInvoke
|
||||
operator fun invoke(locales: Any /* String | Array<String> */ = definedExternally, options: CollatorOptions = definedExternally): Collator
|
||||
fun supportedLocalesOf(locales: Any /* String | Array<String> */, options: CollatorOptions = definedExternally): Array<String>
|
||||
}
|
||||
}
|
||||
|
||||
external interface NumberFormatOptions {
|
||||
var localeMatcher: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var style: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var currency: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var currencyDisplay: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var useGrouping: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var minimumIntegerDigits: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var minimumFractionDigits: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var maximumFractionDigits: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var minimumSignificantDigits: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var maximumSignificantDigits: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface ResolvedNumberFormatOptions {
|
||||
var locale: String
|
||||
var numberingSystem: String
|
||||
var style: String
|
||||
var currency: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var currencyDisplay: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var minimumIntegerDigits: Number
|
||||
var minimumFractionDigits: Number
|
||||
var maximumFractionDigits: Number
|
||||
var minimumSignificantDigits: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var maximumSignificantDigits: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var useGrouping: Boolean
|
||||
}
|
||||
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
external interface NumberFormat {
|
||||
fun format(value: Number): String
|
||||
fun resolvedOptions(): ResolvedNumberFormatOptions
|
||||
|
||||
companion object {
|
||||
@nativeInvoke
|
||||
operator fun invoke(locales: Any /* String | Array<String> */ = definedExternally, options: NumberFormatOptions = definedExternally): NumberFormat
|
||||
fun supportedLocalesOf(locales: Any /* String | Array<String> */, options: NumberFormatOptions = definedExternally): Array<String>
|
||||
}
|
||||
}
|
||||
|
||||
external interface DateTimeFormatOptions {
|
||||
var localeMatcher: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var weekday: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var era: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var year: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var month: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var day: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var hour: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var minute: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var second: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var timeZoneName: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var formatMatcher: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var hour12: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var timeZone: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface ResolvedDateTimeFormatOptions {
|
||||
var locale: String
|
||||
var calendar: String
|
||||
var numberingSystem: String
|
||||
var timeZone: String
|
||||
var hour12: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var weekday: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var era: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var year: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var month: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var day: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var hour: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var minute: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var second: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var timeZoneName: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
external interface DateTimeFormat {
|
||||
fun format(date: Date = definedExternally): String
|
||||
fun format(): String
|
||||
fun format(date: Number = definedExternally): String
|
||||
fun resolvedOptions(): ResolvedDateTimeFormatOptions
|
||||
|
||||
companion object {
|
||||
@nativeInvoke
|
||||
operator fun invoke(locales: Any /* String | Array<String> */ = definedExternally, options: DateTimeFormatOptions = definedExternally): DateTimeFormat
|
||||
fun supportedLocalesOf(locales: Any /* String | Array<String> */, options: DateTimeFormatOptions = definedExternally): Array<String>
|
||||
}
|
||||
}
|
||||
69
modules/mod2/externals/lib.es5.kt
vendored
69
modules/mod2/externals/lib.es5.kt
vendored
|
|
@ -1,69 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package tsstdlib
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface DateConstructor {
|
||||
@nativeInvoke
|
||||
operator fun invoke(): String
|
||||
var prototype: Date
|
||||
fun parse(s: String): Number
|
||||
fun UTC(year: Number, month: Number, date: Number = definedExternally, hours: Number = definedExternally, minutes: Number = definedExternally, seconds: Number = definedExternally, ms: Number = definedExternally): Number
|
||||
fun now(): Number
|
||||
}
|
||||
|
||||
external interface ConcatArray<T> {
|
||||
var length: Number
|
||||
@nativeGetter
|
||||
operator fun get(n: Number): T?
|
||||
@nativeSetter
|
||||
operator fun set(n: Number, value: T)
|
||||
fun join(separator: String = definedExternally): String
|
||||
fun slice(start: Number = definedExternally, end: Number = definedExternally): Array<T>
|
||||
}
|
||||
|
||||
external interface ArrayConstructor {
|
||||
fun <T> from(iterable: Iterable<T>): Array<T>
|
||||
fun <T> from(iterable: ArrayLike<T>): Array<T>
|
||||
fun <T, U> from(iterable: Iterable<T>, mapfn: (v: T, k: Number) -> U, thisArg: Any = definedExternally): Array<U>
|
||||
fun <T, U> from(iterable: Iterable<T>, mapfn: (v: T, k: Number) -> U): Array<U>
|
||||
fun <T, U> from(iterable: ArrayLike<T>, mapfn: (v: T, k: Number) -> U, thisArg: Any = definedExternally): Array<U>
|
||||
fun <T, U> from(iterable: ArrayLike<T>, mapfn: (v: T, k: Number) -> U): Array<U>
|
||||
fun <T> of(vararg items: T): Array<T>
|
||||
@nativeInvoke
|
||||
operator fun invoke(arrayLength: Number = definedExternally): Array<Any>
|
||||
@nativeInvoke
|
||||
operator fun invoke(): Array<Any>
|
||||
@nativeInvoke
|
||||
operator fun <T> invoke(arrayLength: Number): Array<T>
|
||||
@nativeInvoke
|
||||
operator fun <T> invoke(vararg items: T): Array<T>
|
||||
fun isArray(arg: Any): Boolean
|
||||
var prototype: Array<Any>
|
||||
}
|
||||
|
||||
external interface PromiseLike<T> {
|
||||
fun then(onfulfilled: ((value: T) -> Any?)? = definedExternally, onrejected: ((reason: Any) -> Any?)? = definedExternally): PromiseLike<dynamic /* TResult1 | TResult2 */>
|
||||
}
|
||||
|
||||
external interface ArrayLike<T> {
|
||||
var length: Number
|
||||
@nativeGetter
|
||||
operator fun get(n: Number): T?
|
||||
@nativeSetter
|
||||
operator fun set(n: Number, value: T)
|
||||
}
|
||||
|
||||
typealias Record<K, T> = Any
|
||||
20
modules/mod2/externals/lib.scripthost.kt
vendored
20
modules/mod2/externals/lib.scripthost.kt
vendored
|
|
@ -1,20 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package tsstdlib
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external open class VarDate {
|
||||
open var VarDate_typekey: VarDate
|
||||
}
|
||||
114
modules/mod2/externals/nonDeclarations.ts.kt
vendored
114
modules/mod2/externals/nonDeclarations.ts.kt
vendored
|
|
@ -1,114 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package ts
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
typealias SortedReadonlyArray<T> = Array<T>
|
||||
|
||||
typealias SortedArray<T> = Array<T>
|
||||
|
||||
typealias NodeArray<T> = Array<T>
|
||||
|
||||
typealias DotToken = PunctuationToken<SyntaxKind.DotToken>
|
||||
|
||||
typealias DotDotDotToken = PunctuationToken<SyntaxKind.DotDotDotToken>
|
||||
|
||||
typealias QuestionToken = PunctuationToken<SyntaxKind.QuestionToken>
|
||||
|
||||
typealias ExclamationToken = PunctuationToken<SyntaxKind.ExclamationToken>
|
||||
|
||||
typealias ColonToken = PunctuationToken<SyntaxKind.ColonToken>
|
||||
|
||||
typealias EqualsToken = PunctuationToken<SyntaxKind.EqualsToken>
|
||||
|
||||
typealias AsteriskToken = PunctuationToken<SyntaxKind.AsteriskToken>
|
||||
|
||||
typealias EqualsGreaterThanToken = PunctuationToken<SyntaxKind.EqualsGreaterThanToken>
|
||||
|
||||
typealias PlusToken = PunctuationToken<SyntaxKind.PlusToken>
|
||||
|
||||
typealias MinusToken = PunctuationToken<SyntaxKind.MinusToken>
|
||||
|
||||
typealias QuestionDotToken = PunctuationToken<SyntaxKind.QuestionDotToken>
|
||||
|
||||
typealias AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>
|
||||
|
||||
typealias AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>
|
||||
|
||||
typealias AwaitKeywordToken = AwaitKeyword
|
||||
|
||||
typealias AssertsToken = AssertsKeyword
|
||||
|
||||
typealias AbstractKeyword = ModifierToken<SyntaxKind.AbstractKeyword>
|
||||
|
||||
typealias AsyncKeyword = ModifierToken<SyntaxKind.AsyncKeyword>
|
||||
|
||||
typealias ConstKeyword = ModifierToken<SyntaxKind.ConstKeyword>
|
||||
|
||||
typealias DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>
|
||||
|
||||
typealias DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>
|
||||
|
||||
typealias ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>
|
||||
|
||||
typealias PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>
|
||||
|
||||
typealias ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>
|
||||
|
||||
typealias PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>
|
||||
|
||||
typealias ReadonlyKeyword = ModifierToken<SyntaxKind.ReadonlyKeyword>
|
||||
|
||||
typealias OverrideKeyword = ModifierToken<SyntaxKind.OverrideKeyword>
|
||||
|
||||
typealias StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>
|
||||
|
||||
typealias ReadonlyToken = ReadonlyKeyword
|
||||
|
||||
typealias ModifiersArray = NodeArray<dynamic /* AbstractKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword */>
|
||||
|
||||
typealias IncrementExpression = UpdateExpression
|
||||
|
||||
typealias ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken
|
||||
|
||||
typealias BinaryOperatorToken = Token<dynamic /* SyntaxKind.QuestionQuestionToken | ExponentiationOperator | SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword | SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CommaToken */>
|
||||
|
||||
typealias AssignmentOperatorToken = Token<dynamic /* SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken */>
|
||||
|
||||
typealias FunctionBody = Block
|
||||
|
||||
typealias WriteFileCallback = (fileName: String, data: String, writeByteOrderMark: Boolean, onError: (message: String) -> Unit, sourceFiles: Array<SourceFile>) -> Unit
|
||||
|
||||
typealias CustomTransformerFactory = (context: TransformationContext) -> CustomTransformer
|
||||
|
||||
typealias SymbolTable = UnderscoreEscapedMap<Symbol>
|
||||
|
||||
typealias JsFileExtensionInfo = FileExtensionInfo
|
||||
|
||||
typealias EmitHelperUniqueNameCallback = (name: String) -> String
|
||||
|
||||
typealias TransformerFactory<T> = (context: TransformationContext) -> Transformer<T>
|
||||
|
||||
typealias Transformer<T> = (node: T) -> T
|
||||
|
||||
typealias Visitor = (node: Node) -> dynamic
|
||||
|
||||
typealias FileWatcherCallback = (fileName: String, eventKind: FileWatcherEventKind) -> Unit
|
||||
|
||||
typealias DirectoryWatcherCallback = (fileName: String) -> Unit
|
||||
|
||||
typealias DiagnosticReporter = (diagnostic: Diagnostic) -> Unit
|
||||
|
||||
typealias CodeActionCommand = InstallPackageAction
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.SourceFile
|
||||
|
||||
external interface TranspiledFile {
|
||||
var outPath: String
|
||||
var sourceFiles: Array<SourceFile>
|
||||
var lua: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var luaSourceMap: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var declaration: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var declarationMap: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface ParsedCommandLine : ts.ParsedCommandLine
|
||||
|
||||
external fun updateParsedConfigFile(parsedConfigFile: ts.ParsedCommandLine): ParsedCommandLine
|
||||
|
||||
external fun parseCommandLine(args: Array<String>): ParsedCommandLine
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external interface Plugin {
|
||||
var visitors: Visitors?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var printer: Printer?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.DiagnosticRelatedInformation
|
||||
import ts.DiagnosticCategory
|
||||
import ts.SourceFile
|
||||
import ts.Diagnostic
|
||||
import ts.System
|
||||
import ts.DiagnosticReporter
|
||||
|
||||
external interface `T$13` {
|
||||
var code: Any
|
||||
var reportsUnnecessary: Any?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var reportsDeprecated: Any?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var source: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var relatedInformation: Array<DiagnosticRelatedInformation>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var category: DiagnosticCategory
|
||||
var file: SourceFile?
|
||||
var start: Number?
|
||||
var length: Number?
|
||||
var messageText: dynamic /* String | ts.DiagnosticMessageChain */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external var prepareDiagnosticForFormatting: (diagnostic: Diagnostic) -> `T$13`
|
||||
|
||||
external fun createDiagnosticReporter(pretty: Boolean, system: System = definedExternally): DiagnosticReporter
|
||||
|
|
@ -1,192 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
typealias SourceMapUrl = String
|
||||
|
||||
external interface StartOfSourceMap {
|
||||
var file: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sourceRoot: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var skipValidation: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface RawSourceMap {
|
||||
var version: Number
|
||||
var sources: Array<String>
|
||||
var names: Array<String>
|
||||
var sourceRoot: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sourcesContent: Array<String>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var mappings: String
|
||||
var file: String
|
||||
}
|
||||
|
||||
external interface RawIndexMap : StartOfSourceMap {
|
||||
var version: Number
|
||||
var sections: Array<RawSection>
|
||||
}
|
||||
|
||||
external interface RawSection {
|
||||
var offset: Position
|
||||
var map: RawSourceMap
|
||||
}
|
||||
|
||||
external interface Position {
|
||||
var line: Number
|
||||
var column: Number
|
||||
}
|
||||
|
||||
external interface NullablePosition {
|
||||
var line: Number?
|
||||
var column: Number?
|
||||
var lastColumn: Number?
|
||||
}
|
||||
|
||||
external interface MappedPosition {
|
||||
var source: String
|
||||
var line: Number
|
||||
var column: Number
|
||||
var name: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface NullableMappedPosition {
|
||||
var source: String?
|
||||
var line: Number?
|
||||
var column: Number?
|
||||
var name: String?
|
||||
}
|
||||
|
||||
external interface MappingItem {
|
||||
var source: String
|
||||
var generatedLine: Number
|
||||
var generatedColumn: Number
|
||||
var originalLine: Number
|
||||
var originalColumn: Number
|
||||
var name: String
|
||||
}
|
||||
|
||||
external interface Mapping {
|
||||
var generated: Position
|
||||
var original: Position
|
||||
var source: String
|
||||
var name: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface CodeWithSourceMap {
|
||||
var code: String
|
||||
var map: SourceMapGenerator
|
||||
}
|
||||
|
||||
external interface SourceMapConsumer {
|
||||
fun computeColumnSpans()
|
||||
fun originalPositionFor(generatedPosition: Position /* Position & `T$19` */): NullableMappedPosition
|
||||
fun generatedPositionFor(originalPosition: MappedPosition /* MappedPosition & `T$19` */): NullablePosition
|
||||
fun allGeneratedPositionsFor(originalPosition: MappedPosition): Array<NullablePosition>
|
||||
fun hasContentsOfAllSources(): Boolean
|
||||
fun sourceContentFor(source: String, returnNullOnMissing: Boolean = definedExternally): String?
|
||||
fun eachMapping(callback: (mapping: MappingItem) -> Unit, context: Any = definedExternally, order: Number = definedExternally)
|
||||
fun destroy()
|
||||
}
|
||||
|
||||
external interface SourceMapConsumerConstructor {
|
||||
var prototype: SourceMapConsumer
|
||||
var GENERATED_ORDER: Number
|
||||
var ORIGINAL_ORDER: Number
|
||||
var GREATEST_LOWER_BOUND: Number
|
||||
var LEAST_UPPER_BOUND: Number
|
||||
fun fromSourceMap(sourceMap: SourceMapGenerator, sourceMapUrl: SourceMapUrl = definedExternally): Promise<BasicSourceMapConsumer>
|
||||
fun <T> with(rawSourceMap: RawSourceMap, sourceMapUrl: SourceMapUrl?, callback: (consumer: Any /* BasicSourceMapConsumer | IndexedSourceMapConsumer */) -> Any?): Promise<T>
|
||||
fun <T> with(rawSourceMap: RawIndexMap, sourceMapUrl: SourceMapUrl?, callback: (consumer: Any /* BasicSourceMapConsumer | IndexedSourceMapConsumer */) -> Any?): Promise<T>
|
||||
fun <T> with(rawSourceMap: String, sourceMapUrl: SourceMapUrl?, callback: (consumer: Any /* BasicSourceMapConsumer | IndexedSourceMapConsumer */) -> Any?): Promise<T>
|
||||
}
|
||||
|
||||
external interface BasicSourceMapConsumer : SourceMapConsumer {
|
||||
var file: String
|
||||
var sourceRoot: String
|
||||
var sources: Array<String>
|
||||
var sourcesContent: Array<String>
|
||||
}
|
||||
|
||||
external interface BasicSourceMapConsumerConstructor {
|
||||
var prototype: BasicSourceMapConsumer
|
||||
fun fromSourceMap(sourceMap: SourceMapGenerator): Promise<BasicSourceMapConsumer>
|
||||
}
|
||||
|
||||
external interface IndexedSourceMapConsumer : SourceMapConsumer {
|
||||
var sources: Array<String>
|
||||
}
|
||||
|
||||
external interface IndexedSourceMapConsumerConstructor {
|
||||
var prototype: IndexedSourceMapConsumer
|
||||
}
|
||||
|
||||
external open class SourceMapGenerator(startOfSourceMap: StartOfSourceMap = definedExternally) {
|
||||
open fun addMapping(mapping: Mapping)
|
||||
open fun setSourceContent(sourceFile: String, sourceContent: String)
|
||||
open fun applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile: String = definedExternally, sourceMapPath: String = definedExternally)
|
||||
override fun toString(): String
|
||||
open fun toJSON(): RawSourceMap
|
||||
|
||||
companion object {
|
||||
fun fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator
|
||||
}
|
||||
}
|
||||
|
||||
external open class SourceNode {
|
||||
open var children: Array<SourceNode>
|
||||
open var sourceContents: Any
|
||||
open var line: Number
|
||||
open var column: Number
|
||||
open var source: String
|
||||
open var name: String
|
||||
constructor()
|
||||
constructor(line: Number?, column: Number?, source: String?, chunks: Array<Any /* String | SourceNode */> = definedExternally, name: String = definedExternally)
|
||||
constructor(line: Number?, column: Number?, source: String?)
|
||||
constructor(line: Number?, column: Number?, source: String?, chunks: Array<Any /* String | SourceNode */> = definedExternally)
|
||||
constructor(line: Number?, column: Number?, source: String?, chunks: SourceNode = definedExternally, name: String = definedExternally)
|
||||
constructor(line: Number?, column: Number?, source: String?, chunks: SourceNode = definedExternally)
|
||||
constructor(line: Number?, column: Number?, source: String?, chunks: String = definedExternally, name: String = definedExternally)
|
||||
constructor(line: Number?, column: Number?, source: String?, chunks: String = definedExternally)
|
||||
open fun add(chunk: Array<Any /* String | SourceNode */>): SourceNode
|
||||
open fun add(chunk: SourceNode): SourceNode
|
||||
open fun add(chunk: String): SourceNode
|
||||
open fun prepend(chunk: Array<Any /* String | SourceNode */>): SourceNode
|
||||
open fun prepend(chunk: SourceNode): SourceNode
|
||||
open fun prepend(chunk: String): SourceNode
|
||||
open fun setSourceContent(sourceFile: String, sourceContent: String)
|
||||
open fun walk(fn: (chunk: String, mapping: MappedPosition) -> Unit)
|
||||
open fun walkSourceContents(fn: (file: String, content: String) -> Unit)
|
||||
open fun join(sep: String): SourceNode
|
||||
open fun replaceRight(pattern: String, replacement: String): SourceNode
|
||||
override fun toString(): String
|
||||
open fun toStringWithSourceMap(startOfSourceMap: StartOfSourceMap = definedExternally): CodeWithSourceMap
|
||||
|
||||
companion object {
|
||||
fun fromStringWithSourceMap(code: String, sourceMapConsumer: SourceMapConsumer, relativePath: String = definedExternally): SourceNode
|
||||
}
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.Program
|
||||
import ts.SourceFile
|
||||
import ts.CustomTransformers
|
||||
import ts.Diagnostic
|
||||
import ts.WriteFileCallback
|
||||
|
||||
external interface TranspileOptions {
|
||||
var program: Program
|
||||
var sourceFiles: Array<SourceFile>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var customTransformers: CustomTransformers?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var plugins: Array<Plugin>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface TranspileResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var transpiledFiles: Array<ProcessedFile>
|
||||
}
|
||||
|
||||
external fun getProgramTranspileResult(emitHost: EmitHost, writeFileResult: WriteFileCallback, __2: TranspileOptions): TranspileResult
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.WriteFileCallback
|
||||
import ts.Diagnostic
|
||||
import ts.Program
|
||||
|
||||
external interface TranspilerOptions {
|
||||
var emitHost: EmitHost?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface EmitOptions : TranspileOptions {
|
||||
var writeFile: WriteFileCallback?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface EmitResult {
|
||||
var emitSkipped: Boolean
|
||||
var diagnostics: Array<Diagnostic>
|
||||
}
|
||||
|
||||
external interface `T$20` {
|
||||
var emitPlan: Array<EmitFile>
|
||||
}
|
||||
|
||||
external open class Transpiler(__0: TranspilerOptions = definedExternally) {
|
||||
open var emitHost: EmitHost
|
||||
open fun emit(emitOptions: EmitOptions): EmitResult
|
||||
open fun getEmitPlan(program: Program, diagnostics: Array<Diagnostic>, files: Array<ProcessedFile>): `T$20`
|
||||
}
|
||||
|
||||
external fun getEmitPath(file: String, program: Program): String
|
||||
|
||||
external fun getEmitPathRelativeToOutDir(fileName: String, program: Program): String
|
||||
|
||||
external fun getSourceDir(program: Program): String
|
||||
|
||||
external fun getEmitOutDir(program: Program): String
|
||||
|
||||
external fun getProjectRoot(program: Program): String
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.CompilerOptions
|
||||
import ts.System
|
||||
|
||||
external fun parseConfigFileWithSystem(configFileName: String, commandLineOptions: OmitIndexSignature<CompilerOptions> /* OmitIndexSignature<ts.CompilerOptions> & `T$0` */ = definedExternally, system: System = definedExternally): ParsedCommandLine
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
external fun setTimeout(handler: (args: Any) -> Unit, timeout: Number): Any
|
||||
|
||||
external fun clearTimeout(handle: Any)
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
@file:JsQualifier("ts.ScriptSnapshot")
|
||||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package ts.ScriptSnapshot
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.IScriptSnapshot
|
||||
|
||||
external fun fromString(text: String): IScriptSnapshot
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,104 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
package ts.server
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.CompilerOptions
|
||||
import ts.WatchOptions
|
||||
import ts.TypeAcquisition
|
||||
import ts.SortedReadonlyArray
|
||||
|
||||
external interface TypingInstallerResponse {
|
||||
var kind: String /* "action::set" | "action::invalidate" | "event::typesRegistry" | "action::packageInstalled" | "event::beginInstallTypes" | "event::endInstallTypes" | "event::initializationFailed" */
|
||||
}
|
||||
|
||||
external interface TypingInstallerRequestWithProjectName {
|
||||
var projectName: String
|
||||
}
|
||||
|
||||
external interface DiscoverTypings : TypingInstallerRequestWithProjectName {
|
||||
var fileNames: Array<String>
|
||||
var projectRootPath: String /* String & `T$3` */
|
||||
var compilerOptions: CompilerOptions
|
||||
var watchOptions: WatchOptions?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var typeAcquisition: TypeAcquisition
|
||||
var unresolvedImports: SortedReadonlyArray<String>
|
||||
var cachePath: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var kind: String /* "discover" */
|
||||
}
|
||||
|
||||
external interface CloseProject : TypingInstallerRequestWithProjectName {
|
||||
var kind: String /* "closeProject" */
|
||||
}
|
||||
|
||||
external interface TypesRegistryRequest {
|
||||
var kind: String /* "typesRegistry" */
|
||||
}
|
||||
|
||||
external interface InstallPackageRequest : TypingInstallerRequestWithProjectName {
|
||||
var kind: String /* "installPackage" */
|
||||
var fileName: String /* String & `T$3` */
|
||||
var packageName: String
|
||||
var projectRootPath: String /* String & `T$3` */
|
||||
}
|
||||
|
||||
external interface PackageInstalledResponse : ProjectResponse {
|
||||
override var kind: String /* "action::packageInstalled" */
|
||||
var success: Boolean
|
||||
var message: String
|
||||
}
|
||||
|
||||
external interface InitializationFailedResponse : TypingInstallerResponse {
|
||||
override var kind: String /* "event::initializationFailed" */
|
||||
var message: String
|
||||
var stack: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface ProjectResponse : TypingInstallerResponse {
|
||||
var projectName: String
|
||||
}
|
||||
|
||||
external interface InvalidateCachedTypings : ProjectResponse {
|
||||
override var kind: String /* "action::invalidate" */
|
||||
}
|
||||
|
||||
external interface InstallTypes : ProjectResponse {
|
||||
override var kind: String /* "event::beginInstallTypes" | "event::endInstallTypes" */
|
||||
var eventId: Number
|
||||
var typingsInstallerVersion: String
|
||||
var packagesToInstall: Array<String>
|
||||
}
|
||||
|
||||
external interface BeginInstallTypes : InstallTypes {
|
||||
override var kind: String /* "event::beginInstallTypes" */
|
||||
}
|
||||
|
||||
external interface EndInstallTypes : InstallTypes {
|
||||
override var kind: String /* "event::endInstallTypes" */
|
||||
var installSuccess: Boolean
|
||||
}
|
||||
|
||||
external interface SetTypings : ProjectResponse {
|
||||
var typeAcquisition: TypeAcquisition
|
||||
var compilerOptions: CompilerOptions
|
||||
var typings: Array<String>
|
||||
var unresolvedImports: SortedReadonlyArray<String>
|
||||
override var kind: String /* "action::set" */
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.WriteFileCallback
|
||||
import ts.SourceFile
|
||||
|
||||
external interface EmitHost {
|
||||
fun directoryExists(path: String): Boolean
|
||||
fun fileExists(path: String): Boolean
|
||||
fun getCurrentDirectory(): String
|
||||
fun readFile(path: String): String?
|
||||
var writeFile: WriteFileCallback
|
||||
}
|
||||
|
||||
external interface BaseFile {
|
||||
var code: String
|
||||
var sourceMap: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sourceFiles: Array<SourceFile>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface ProcessedFile : BaseFile {
|
||||
var fileName: String
|
||||
var luaAst: File?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external interface EmitFile : BaseFile {
|
||||
var outputPath: String
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
|
||||
|
||||
import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import org.w3c.dom.parsing.*
|
||||
import org.w3c.dom.svg.*
|
||||
import org.w3c.dom.url.*
|
||||
import org.w3c.fetch.*
|
||||
import org.w3c.files.*
|
||||
import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
import ts.Statement
|
||||
import ts.Node
|
||||
import tsstdlib.Map
|
||||
import ts.SyntaxKind
|
||||
|
||||
external interface NodesBySyntaxKind
|
||||
|
||||
typealias StatementLikeNode = Statement
|
||||
|
||||
typealias VisitorResult<T> = Any
|
||||
|
||||
typealias FunctionVisitor<T> = (node: T, context: TransformationContext) -> VisitorResult<T>
|
||||
|
||||
external interface ObjectVisitor<T : Node> {
|
||||
var transform: FunctionVisitor<T>
|
||||
var priority: Number?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
typealias Visitors = Any
|
||||
|
||||
typealias VisitorMap = Map<SyntaxKind, Array<ObjectVisitor<Node>>>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fun main() {
|
||||
|
||||
|
||||
script.on_event(
|
||||
defines.events.on_tick
|
||||
) { event ->
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
# Typed Factorio
|
||||
|
||||
Complete and featureful typescript definitions for the Factorio modding lua api. This is intended to be used with [TypescriptToLua](https://typescripttolua.github.io/).
|
||||
|
||||
This project aims to provide type definitions for the Factorio API that are as complete as possible. This means minimal `any`s and `unknown`s, correct nullability, and smart types where possible. The generator integrates both the Factorio JSON api docs and manually defined additions and overrides.
|
||||
|
||||
## Installation
|
||||
|
||||
To use in your TypescriptToLua project:
|
||||
|
||||
1. Install this package
|
||||
|
||||
```
|
||||
npm install typed-factorio
|
||||
|
||||
or
|
||||
|
||||
yarn add typed-factorio
|
||||
```
|
||||
|
||||
2. Add to your `tsconfig.json`:
|
||||
|
||||
```diff
|
||||
{
|
||||
"compilerOptions": {
|
||||
+ "types": [ "typed-factorio/runtime" ]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This will add the types for the runtime stage to your entire project.
|
||||
|
||||
Note: When types are updated, or released for a new factorio version, you will need update your package version to get the types.
|
||||
|
||||
### Settings and data stage
|
||||
|
||||
There are also definitions for the settings/data stage.
|
||||
|
||||
To avoid type conflicts, the global tables for the settings/data stages have to be declared manually where you need them. These types can be imported from `typed-factorio/data/types` or `typed-factorio/settings/types`.
|
||||
|
||||
Example:
|
||||
|
||||
```ts
|
||||
import { Data, Mods } from "typed-factorio/data/types"
|
||||
// or
|
||||
import { Data, Mods } from "typed-factorio/settings/types"
|
||||
|
||||
declare const data: Data
|
||||
declare const mods: Mods
|
||||
|
||||
data.extend([{ ... }])
|
||||
```
|
||||
|
||||
There are currently full types for settings stage, but only basic types for the data stage.
|
||||
|
||||
### Factorio lualib modules
|
||||
|
||||
Currently, there are types for the following modules:
|
||||
|
||||
- `util`
|
||||
- `mod-gui`
|
||||
|
||||
If you have a need for types to more lualib modules, feel free to open an issue or pull request on GitHub.
|
||||
|
||||
## Type features
|
||||
|
||||
Typed-factorio has 100% complete types for the runtime stage. Description-only concepts and some not documented types are filled in manually.
|
||||
|
||||
### Lua features
|
||||
|
||||
The types include [TypescriptToLua language extensions](https://typescripttolua.github.io/docs/advanced/language-extensions/)
|
||||
and [lua-types](https://github.com/TypeScriptToLua/lua-types) (for v5.2) as dependencies.
|
||||
|
||||
This is to use tstl features such as `LuaLengthMethod` and `LuaMultiReturn`.
|
||||
|
||||
### `nil`
|
||||
|
||||
The types consistently use `undefined` to represent `nil`.
|
||||
`null` is not used, because `undefined` in typescript is much more similar to `nil` in lua, and optional parameters/properties already use `undefined`.
|
||||
|
||||
A class attribute is marked as possibly undefined only if the _read_ type is possibly `nil`. For properties where `nil` is not possible on _read_, but is possible on _write_, you can write `nil` by using `undefined!` or `myNullableValue!`, e.g. `controlBehavior.parameters = undefined!`.
|
||||
|
||||
### Variant parameter types
|
||||
|
||||
Variant parameter types (types with "additional fields can be specified depending on ...") are handled as discriminated unions. This gives proper type checking for individual variants.
|
||||
|
||||
The type for a specific variant is prefixed with the either variant name or "Other" for variants without additional fields, e.g. `AmmoDamageTechnologyModifier`, `OtherTechnologyModifier`
|
||||
|
||||
### Events
|
||||
|
||||
`script.on_event()`, `script.get/set_filters()`, and `script.raise_event()` all have type checking on the event data/filter type, inferred from what is passed as the event name/id.
|
||||
|
||||
You can pass a type parameter to `script.generate_event_name()`, and it will return an `EventId` that holds type info of the event data. Event functions on `script` can then use the type data when the `EventId` is passed.
|
||||
|
||||
### Array-like types
|
||||
|
||||
Classes that have an index operator, a length operator, and have an array-like structure, inherit from `(Readonly)Array`. These are `LuaInventory`, `LuaFluidBox`, `LuaTransportLine`. This allows you to use these classes like arrays, meaning having array methods, and `.length` translating to the lua length operator. However, this also means, like typescript arrays, they are **0-indexed, not 1-indexed**.
|
||||
|
||||
### Table or array types
|
||||
|
||||
For table or array types (e.g. Position), there also are types such as `PositionTable` and `PositionArray` that refer to the table or array form specifically.
|
||||
|
||||
### LuaGuiElement
|
||||
|
||||
`LuaGuiElement` is broken up into a discriminated union for each gui element type (See [here](https://basarat.gitbook.io/typescript/type-system/discriminated-unions) for information on discriminated unions). The type for a specific GuiElement type is `<Type>GuiElement`, e.g. `ButtonGuiElement`.
|
||||
|
||||
Similarly, the table passed to `LuaGuiElement.add`, referred to as `GuiSpec`, is also broken up into a discriminated union for each gui element type. The type for a specific GuiSpec type is `<Type>GuiSpec`, e.g. `ListBoxGuiSpec`.
|
||||
|
||||
This is done both to provide more accurate types, and for possible integration with [JSX](https://typescripttolua.github.io/docs/jsx/).
|
||||
|
||||
### Examples
|
||||
|
||||
Check out the `test` directory on GitHub for more examples on particular type features.
|
||||
13
modules/mod2/typed-factorio/data/types.d.ts
vendored
13
modules/mod2/typed-factorio/data/types.d.ts
vendored
|
|
@ -1,13 +0,0 @@
|
|||
export interface Data {
|
||||
readonly raw: Record<string, Record<string, any>>
|
||||
|
||||
/**
|
||||
* The `data` table expects a specific format for each item in the table. Missing properties will either fall back to
|
||||
* default values or give an error indicating what's missing. Extra properties that the game isn't looking for are
|
||||
* simply ignored.
|
||||
*/
|
||||
extend(prototypes: Record<string, any>[]): void
|
||||
}
|
||||
|
||||
/** A mapping of mod names to mod version for all enabled mods. */
|
||||
export type Mods = Record<string, string>
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
/** @noSelfInFile */
|
||||
|
||||
/**
|
||||
* A floating-point number. This is a single-precision floating point number. Whilst Lua only uses double-precision
|
||||
* numbers, when a function takes a float, the game engine will immediately convert the double-precision number to
|
||||
* single-precision.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#float View documentation}
|
||||
*/
|
||||
type float = number
|
||||
|
||||
/**
|
||||
* A double-precision floating-point number. This is the same data type as all Lua numbers use.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#double View documentation}
|
||||
*/
|
||||
type double = number
|
||||
|
||||
/**
|
||||
* 32-bit signed integer. Possible values are -2,147,483,648 to 2,147,483,647.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#int View documentation}
|
||||
*/
|
||||
type int = number
|
||||
|
||||
/**
|
||||
* 8-bit signed integer. Possible values are -128 to 127.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#int8 View documentation}
|
||||
*/
|
||||
type int8 = number
|
||||
|
||||
/**
|
||||
* 32-bit unsigned integer. Possible values are 0 to 4,294,967,295.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#uint View documentation}
|
||||
*/
|
||||
type uint = number
|
||||
|
||||
/**
|
||||
* 8-bit unsigned integer. Possible values are 0 to 255.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#uint8 View documentation}
|
||||
*/
|
||||
type uint8 = number
|
||||
|
||||
/**
|
||||
* 16-bit unsigned integer. Possible values are 0 to 65535.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#uint16 View documentation}
|
||||
*/
|
||||
type uint16 = number
|
||||
|
||||
/**
|
||||
* 64-bit unsigned integer. Possible values are 0 to 18,446,744,073,709,551,615.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#uint64 View documentation}
|
||||
*/
|
||||
type uint64 = number
|
||||
|
||||
/**
|
||||
* Tables are enclosed in curly brackets, like this `{}`
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/Builtin-Types.html#table View documentation}
|
||||
*/
|
||||
type table = object
|
||||
20023
modules/mod2/typed-factorio/generated/classes.d.ts
vendored
20023
modules/mod2/typed-factorio/generated/classes.d.ts
vendored
File diff suppressed because it is too large
Load diff
5635
modules/mod2/typed-factorio/generated/concepts.d.ts
vendored
5635
modules/mod2/typed-factorio/generated/concepts.d.ts
vendored
File diff suppressed because it is too large
Load diff
1642
modules/mod2/typed-factorio/generated/defines.d.ts
vendored
1642
modules/mod2/typed-factorio/generated/defines.d.ts
vendored
File diff suppressed because it is too large
Load diff
2976
modules/mod2/typed-factorio/generated/events.d.ts
vendored
2976
modules/mod2/typed-factorio/generated/events.d.ts
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -1,51 +0,0 @@
|
|||
/** @noSelfInFile */
|
||||
|
||||
/**
|
||||
* This is the main object, through which most of the API is accessed. It is, however, not available inside handlers
|
||||
* registered with {@link LuaBootstrap.on_load LuaBootstrap::on_load}.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/ View documentation}
|
||||
*/
|
||||
declare const game: LuaGameScript
|
||||
|
||||
/**
|
||||
* Provides an interface for registering event handlers.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/ View documentation}
|
||||
*/
|
||||
declare const script: LuaBootstrap
|
||||
|
||||
/**
|
||||
* Allows inter-mod communication by way of providing a repository of interfaces that is shared by all mods.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/ View documentation}
|
||||
*/
|
||||
declare const remote: LuaRemote
|
||||
|
||||
/**
|
||||
* Allows registering custom commands for the in-game console accessible via the grave key.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/ View documentation}
|
||||
*/
|
||||
declare const commands: LuaCommandProcessor
|
||||
|
||||
/**
|
||||
* Allows reading the current mod settings.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/ View documentation}
|
||||
*/
|
||||
declare const settings: LuaSettings
|
||||
|
||||
/**
|
||||
* Allows printing messages to the calling RCON instance if any.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/ View documentation}
|
||||
*/
|
||||
declare const rcon: LuaRCON
|
||||
|
||||
/**
|
||||
* Allows rendering of geometric shapes, text and sprites in the game world.
|
||||
*
|
||||
* {@link https://lua-api.factorio.com/next/ View documentation}
|
||||
*/
|
||||
declare const rendering: LuaRendering
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
///<reference types="lua-types/5.2" />
|
||||
///<reference path="builtin-types.d.ts" />
|
||||
///<reference path="defines.d.ts" />
|
||||
///<reference path="events.d.ts" />
|
||||
///<reference path="classes.d.ts" />
|
||||
///<reference path="concepts.d.ts" />
|
||||
///<reference path="global-objects.d.ts" />
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
"name": "typed-factorio",
|
||||
"version": "0.7.1",
|
||||
"description": "Featureful typescript definitions for the the Factorio modding lua api.",
|
||||
"keywords": [
|
||||
"factorio",
|
||||
"types",
|
||||
"typescript-to-lua",
|
||||
"tstl"
|
||||
],
|
||||
"repository": "https://github.com/GlassBricks/typed-factorio",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"**/*.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/GlassBricks/typed-factorio#readme",
|
||||
"scripts": {
|
||||
"generate": "cd ../generator && yarn run check && yarn run gen --in ../definitions/generatorSrc --out ../definitions/generated --warn-as-error",
|
||||
"generate:dev": "cd ../generator && yarn run gen --in ../definitions/generatorSrc --out ../definitions/generated --no-format",
|
||||
"clean": "rimraf ./generated",
|
||||
"pretest": "yarn run generate",
|
||||
"test": "jest",
|
||||
"prepublishOnly": "yarn run test",
|
||||
"download-latest-runtime-api": "ts-node ./scripts/downloadLatest.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"lua-types": "^2.10.1",
|
||||
"typescript": "~4.3.5",
|
||||
"typescript-to-lua": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.24",
|
||||
"@types/node": "^16.4.13",
|
||||
"jest": "^27.0.6",
|
||||
"prettier": "^2.3.2",
|
||||
"ts-jest": "^27.0.4",
|
||||
"ts-node": "^10.1.0"
|
||||
}
|
||||
}
|
||||
10
modules/mod2/typed-factorio/runtime/index.d.ts
vendored
10
modules/mod2/typed-factorio/runtime/index.d.ts
vendored
|
|
@ -1,10 +0,0 @@
|
|||
/// <reference types="lua-types/5.2" />
|
||||
|
||||
/// <reference path="../generated/index.d.ts" />
|
||||
|
||||
/// <reference path="librariesAndFunctions.d.ts" />
|
||||
/// <reference path="pairs.d.ts" />
|
||||
|
||||
// lualib
|
||||
/// <reference path="util.d.ts" />
|
||||
/// <reference path="mod-gui.d.ts" />
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
// from https://lua-api.factorio.com/latest/Libraries.html
|
||||
// last updated for 1.1.35, 1.1.36, 1.1.37
|
||||
|
||||
/** @noSelfInFile */
|
||||
|
||||
/** @noSelf */
|
||||
interface SerpentOptions {
|
||||
/** Indentation; triggers long multi-line output. */
|
||||
indent: string
|
||||
/** Provide stringified value in a comment (up to maxlevel of depth). */
|
||||
comment: boolean | number
|
||||
/** Sort keys. */
|
||||
sortkeys: boolean | ((this: void, keys: any[], table: any) => void)
|
||||
/** Force sparse encoding (no nil filling based on #t). */
|
||||
sparse: boolean
|
||||
/** Remove spaces. */
|
||||
compact: boolean
|
||||
/** Raise fatal error on non-serializable values. */
|
||||
fatal: boolean
|
||||
/** Disable bytecode serialization for easy comparison. */
|
||||
nocode: boolean
|
||||
/** Disable checking numbers against undefined and huge values. */
|
||||
nohuge: boolean
|
||||
/** Specify max level up to which to expand nested tables. */
|
||||
maxlevel: number
|
||||
/** Specify max number of elements in a table. */
|
||||
maxnum: number
|
||||
/** Specify max length for all table elements. */
|
||||
maxlength: number
|
||||
/**
|
||||
* Use __tostring metamethod when serializing tables (v0.29); set to false to disable and serialize the table as is,
|
||||
* even when __tostring is present.
|
||||
*/
|
||||
metatostring: boolean
|
||||
/**
|
||||
* Specify format for numeric values as shortest possible round-trippable double (v0.30). Use "%.16g" for better
|
||||
* readability and "%.17g" (the default value) to preserve floating point precision.
|
||||
*/
|
||||
numformat: string
|
||||
/** Allows to specify a list of values to ignore (as keys). */
|
||||
valignore: string[]
|
||||
/** Allows to specify the list of keys to be serialized. Any keys not in this list are not included in final output (as keys). */
|
||||
keyallow: string[]
|
||||
/** Allows to specity the list of keys to ignore in serialization. */
|
||||
keyignore: string[]
|
||||
/** Allows to specify a list of value types to ignore (as keys). */
|
||||
valtypeignore: string[]
|
||||
/** Provide custom output for tables. */
|
||||
custom(opts: {
|
||||
/** The name of the current element with '=' or an empty string in case of array index, */
|
||||
tag: string
|
||||
/** An opening table bracket { and associated indentation and newline (if any), */
|
||||
head: string
|
||||
/** Table elements concatenated into a string using commas and indentation/newlines (if any), */
|
||||
body: string
|
||||
/** A closing table bracket } and associated indentation and newline (if any), and */
|
||||
tail: string
|
||||
/** The current level. */
|
||||
level: number
|
||||
}): string
|
||||
/** Name; triggers full serialization with self-ref section. */
|
||||
name: string
|
||||
|
||||
refcomment: boolean | number
|
||||
tablecomment: boolean | number
|
||||
}
|
||||
|
||||
/**
|
||||
* Factorio provides the {@link https://github.com/pkulchenko/serpent serpent library} as a global variable `serpent` for
|
||||
* all mods to use. It allows for easy debugging of tables, because serpent makes it trivial to print them, for example
|
||||
* by using `serpent.block()`. However, serpent cannot pretty-print LuaObjects such as LuaEntity. The serpent library
|
||||
* was modified to improve determinism, e.g. comments are turned off by default to avoid returning table addresses.
|
||||
* Furthermore, two options were added: `refcomment` (true/false/maxlevel) and `tablecomment` (true/false/maxlevel),
|
||||
* which allow to separately control the self-reference and table value output of the `comment` option.
|
||||
*/
|
||||
declare namespace serpent {
|
||||
/** Full serialization; sets name, compact and sparse options; */
|
||||
function dump(tbl: unknown, options?: Partial<SerpentOptions>): string
|
||||
|
||||
/** Single line pretty printing, no self-ref section; sets sortkeys and comment options; */
|
||||
function line(tbl: unknown, options?: Partial<SerpentOptions>): string
|
||||
|
||||
/** Multi-line indented pretty printing, no self-ref section; sets indent, sortkeys, and comment options. */
|
||||
function block(tbl: unknown, options?: Partial<SerpentOptions>): string
|
||||
|
||||
/**
|
||||
* For loading serialized fragments, serpent also provides `load` function that adds safety checks and reports an
|
||||
* error if there is any executable code in the fragment.
|
||||
*/
|
||||
function load<T>(str: string, options?: { safe?: boolean }): LuaMultiReturn<[true, T] | [false, string]>
|
||||
}
|
||||
|
||||
/**
|
||||
* This function allows to log {@link LocalisedString} to the Factorio
|
||||
* {@link https://wiki.factorio.com/Log_file log file}. This, in combination with serpent, makes debugging in the data
|
||||
* stage easier, because it allows to simply inspect entire prototype tables. For example, this allows to see all
|
||||
* properties of the sulfur item prototype: `log(serpent.block(data.raw["item"]["sulfur"]))`
|
||||
*/
|
||||
declare function log(ls: LocalisedString): void
|
||||
|
||||
/**
|
||||
* This function allows printing {@link LocalisedString}s to stdout without polluting the logfile. This is primarily
|
||||
* useful for communicating with external tools that launch Factorio as a child process.
|
||||
*/
|
||||
declare function localised_print(ls: LocalisedString): void
|
||||
|
||||
/**
|
||||
* Factorio provides the function `table_size()` as a simple way to find the size of tables with non-continuous keys,
|
||||
* because the standard `#` does not work correctly for these. The function is a C++-side implementation of the
|
||||
* following Lua code, thus it is faster than using this code in Lua:
|
||||
*
|
||||
* local function size(t)
|
||||
* local count = 0
|
||||
* for k,v in pairs(t) do
|
||||
* count = count + 1
|
||||
* end
|
||||
* return count
|
||||
* end
|
||||
*
|
||||
* Note that `table_size()` does not work correctly for {@link LuaCustomTable}s, their size has to be determined with
|
||||
* {@link LuaCustomTable.length LuaCustomTable::operator #} instead.
|
||||
*/
|
||||
declare function table_size(tbl: table): number
|
||||
11
modules/mod2/typed-factorio/runtime/mod-gui.d.ts
vendored
11
modules/mod2/typed-factorio/runtime/mod-gui.d.ts
vendored
|
|
@ -1,11 +0,0 @@
|
|||
/** @noSelfInFile */
|
||||
|
||||
/** @noResolution */
|
||||
declare module "mod-gui" {
|
||||
const button_style: string
|
||||
const frame_style: string
|
||||
|
||||
function get_button_flow(player: LuaPlayer): FrameGuiElement
|
||||
|
||||
function get_frame_flow(player: LuaPlayer): FlowGuiElement
|
||||
}
|
||||
13
modules/mod2/typed-factorio/runtime/pairs.d.ts
vendored
13
modules/mod2/typed-factorio/runtime/pairs.d.ts
vendored
|
|
@ -1,13 +0,0 @@
|
|||
/** @noSelfInFile */
|
||||
|
||||
/** Iterating with `pairs` will only iterate the array part of a {@link LuaCustomTable}. */
|
||||
declare function pairs<V>(table: LuaCustomTable<number | string, V>): LuaIterable<LuaMultiReturn<[number, V]>>
|
||||
|
||||
declare function pairs<K extends keyof any, V>(table: LuaCustomTable<K, V>): LuaIterable<LuaMultiReturn<[K, V]>>
|
||||
|
||||
/**
|
||||
* {@link LuaCustomTable} cannot be iterated with `ipairs`. Use `pairs` instead.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
declare function ipairs(table: LuaCustomTable<any, any>): never
|
||||
120
modules/mod2/typed-factorio/runtime/util.d.ts
vendored
120
modules/mod2/typed-factorio/runtime/util.d.ts
vendored
|
|
@ -1,120 +0,0 @@
|
|||
// "util" is declared only as a module, even though it also modifies global variables
|
||||
// This is both because of limitations in `declare module`, and that modules are much friendlier to tooling.
|
||||
|
||||
/** @noSelfInFile */
|
||||
|
||||
/** @noResolution */
|
||||
declare module "util" {
|
||||
namespace table {
|
||||
function deepcopy<T>(table: T): T
|
||||
|
||||
function compare<T>(tb1: T, tb2: T): boolean
|
||||
}
|
||||
|
||||
function copy<T>(table: T): T
|
||||
|
||||
function distance(position1: Position, position2: Position): number
|
||||
|
||||
function positiontostr(position: Position): string
|
||||
|
||||
function formattime(ticks: number): string
|
||||
|
||||
/** Supports 'rrggbb', 'rgb', 'rrggbbaa', 'rgba', 'ww', 'w' */
|
||||
function color(hex: string): ColorTable
|
||||
|
||||
function premul_color(color: Color): ColorTable
|
||||
|
||||
function mix_color(c1: Color, c2: Color): ColorArray
|
||||
|
||||
function multiply_color(c1: Color, n: number): ColorArray
|
||||
|
||||
function moveposition(
|
||||
position: Position,
|
||||
direction: defines.direction.north | defines.direction.east | defines.direction.south | defines.direction.west,
|
||||
distance: number
|
||||
): Position
|
||||
function moveposition(
|
||||
position: Position,
|
||||
direction: defines.direction, //todo: cardinal only
|
||||
distance: number
|
||||
): Position | undefined
|
||||
|
||||
function oppositedirection(direction: defines.direction): defines.direction
|
||||
|
||||
/** Creates a new array where each element in `stripes` is duplicated `count` times */
|
||||
function multiplystripes<T>(count: number, stripes: T[]): T[]
|
||||
|
||||
/** Gets tile position by pixel */
|
||||
function by_pixel(x: number, y: number): Position
|
||||
|
||||
/** Gets tile position by pixel, hr */
|
||||
function by_pixel_hr(x: number, y: number): Position
|
||||
|
||||
// omitted: foreach_sprite_definition
|
||||
|
||||
function add_shift(a: PositionArray | undefined, b: PositionArray): PositionArray
|
||||
function add_shift(a: PositionArray, b: PositionArray | undefined): PositionArray
|
||||
function add_shift(a: PositionArray | undefined, b: PositionArray | undefined): PositionArray | undefined
|
||||
|
||||
// omitted: add_shift_offset
|
||||
|
||||
function mul_shift(shift: PositionArray, scale: number | undefined): PositionArray
|
||||
function mul_shift(shift: PositionArray | undefined, scale: number | undefined): PositionArray | undefined
|
||||
|
||||
function format_number(amount: number, append_suffix?: boolean): string
|
||||
|
||||
function increment(t: number[], index: number, v?: number): void
|
||||
|
||||
// omitted: conditional_return
|
||||
|
||||
/**
|
||||
* Recursively merges and/or deep-copies tables. Entries in later tables override entries in earlier ones, unless both
|
||||
* entries are themselves tables, in which case they are recursively merged. Non-merged tables are deep-copied, so
|
||||
* that the result is brand new.
|
||||
*/
|
||||
function merge<T extends object>(tables: T[]): T
|
||||
|
||||
function insert_safe(entity: LuaEntity | undefined, item_dict: Record<string, number> | undefined): void
|
||||
|
||||
function remove_safe(entity: LuaEntity | undefined, item_dict: Record<string, number> | undefined): void
|
||||
|
||||
function split_whitespace(string: string): string[]
|
||||
|
||||
// omitted: split, string_starts_with. already TS functions for that
|
||||
|
||||
// omitted: online_players. use game.connected_players
|
||||
|
||||
function clamp(x: number, lower: number, upper: number): number
|
||||
|
||||
// omitted: get_walkable_tile
|
||||
|
||||
// omitted: combine_icons
|
||||
// omitted: technology_icons. Create an issue if you really want to see these
|
||||
|
||||
function parse_energy(energy: string): number
|
||||
|
||||
function product_amount(
|
||||
product: {
|
||||
probability: number
|
||||
} & (
|
||||
| {
|
||||
amount: number
|
||||
}
|
||||
| {
|
||||
amount_min: number
|
||||
amount_max: number
|
||||
}
|
||||
)
|
||||
): number
|
||||
|
||||
function empty_sprite(): object
|
||||
|
||||
// omitted: draw_as_glow
|
||||
// omitted: remove_tile_references
|
||||
|
||||
function remove_from_list<T>(list: T[], value: T): boolean
|
||||
|
||||
function list_to_map<T extends keyof any>(list: T[]): Record<T, true>
|
||||
function list_to_map<T>(list: T[]): LuaTable<T, true>
|
||||
function list_to_map<T>(list: T): LuaTable<T[keyof T], true>
|
||||
}
|
||||
120
modules/mod2/typed-factorio/settings/types.d.ts
vendored
120
modules/mod2/typed-factorio/settings/types.d.ts
vendored
|
|
@ -1,120 +0,0 @@
|
|||
// Based off of https://wiki.factorio.com/Tutorial:Mod_settings
|
||||
|
||||
export type SettingType = "bool-setting" | "int-setting" | "double-setting" | "string-setting"
|
||||
|
||||
export interface BaseSettingDefinition {
|
||||
type: SettingType
|
||||
/**
|
||||
* The name of the settings prototype should be unique to avoid mod conflicts since the mod settings are global across
|
||||
* all mods. Because of that it is recommended to prefix mod settings with your mod name,
|
||||
*/
|
||||
name: string
|
||||
localized_name?: LocalisedString
|
||||
localized_description?: LocalisedString
|
||||
|
||||
/**
|
||||
* The order property can be used to change how the mod settings are ordered in the settings gui. Mod settings are sorted
|
||||
*
|
||||
* - First by mod
|
||||
* - Then by the setting "order" string
|
||||
* - Then finally by the setting name.
|
||||
*/
|
||||
order?: string
|
||||
/**
|
||||
* The hidden property can be used to hide mod settings from GUIs, so that they cannot be seen or changed by players.
|
||||
* However, other mods can still access hidden settings. {@link https://forums.factorio.com/83316}
|
||||
*/
|
||||
hidden?: boolean
|
||||
/**
|
||||
* There are the overall kinds of settings:
|
||||
*
|
||||
* - **startup**: This kind of setting is available in the prototype stage, and can not be changed runtime. They have to
|
||||
* be set to the same values for all players on a server.
|
||||
* - **runtime-global**: This kind of setting is global to an entire save game and can be changed runtime. On servers,
|
||||
* only admins can change these settings.
|
||||
* - **runtime-per-user**: This kind of setting is only available runtime in the control.lua stage and each player has
|
||||
* their own instance of this setting. When a player joins a server their local setting of "keep mod settings per
|
||||
* save" determines if the local settings they have set are synced to the loaded save or if the save's settings are used.
|
||||
*
|
||||
* This "setting_type" also determines in which tab the setting is showed in the mod settings menu.
|
||||
*/
|
||||
|
||||
setting_type: "startup" | "runtime-global" | "runtime-per-user"
|
||||
}
|
||||
/** A true/false checkbox */
|
||||
export interface BoolSettingDefinition extends BaseSettingDefinition {
|
||||
type: "bool-setting"
|
||||
/** Defines the default value of the setting, in this case whether the checkbox is checked or not. */
|
||||
default_value: boolean
|
||||
/**
|
||||
* Only loaded if `hidden = true`. This forces the setting to be of this value. This can be useful for mod
|
||||
* compatibility. {@link https://forums.factorio.com/viewtopic.php?p=531322#p531322}
|
||||
*/
|
||||
forced_value?: boolean
|
||||
}
|
||||
/** A signed 64 bit integer textfield (or selection dropdown) */
|
||||
export interface IntSettingDefinition extends BaseSettingDefinition {
|
||||
type: "int-setting"
|
||||
/** Defines the default value of the setting. */
|
||||
default_value: number
|
||||
/** Defines the lowest possible number. */
|
||||
minimum_value?: number
|
||||
/** Defines the highest possible number. */
|
||||
maximum_value?: number
|
||||
/**
|
||||
* Makes it possible to force the player to choose between the defined numbers, creates a dropdown instead of a
|
||||
* textfield. If only one allowed value is given, the settings is forced to be of that value.
|
||||
*/
|
||||
allowed_values?: number[]
|
||||
}
|
||||
/** A double precision floating point textfield (or selection dropdown) */
|
||||
export interface DoubleSettingDefinition extends BaseSettingDefinition {
|
||||
type: "double-setting"
|
||||
/** Defines the default value of the setting. */
|
||||
default_value: number
|
||||
/** Defines the lowest possible number. */
|
||||
minimum_value?: number
|
||||
/** Defines the highest possible number. */
|
||||
maximum_value?: number
|
||||
/**
|
||||
* Makes it possible to force the player to choose between the defined numbers, creates a dropdown instead of a
|
||||
* textfield. If only one allowed value is given, the settings is forced to be of that value.
|
||||
*/
|
||||
allowed_values?: number[]
|
||||
}
|
||||
/** A string textfield (or selection dropdown) */
|
||||
export interface StringSettingDefinition extends BaseSettingDefinition {
|
||||
type: "string-setting"
|
||||
/** Defines the default value of the setting. */
|
||||
default_value: string
|
||||
/** Defines whether it's possible for the user to set the textfield to empty and apply the setting. */
|
||||
allow_blank?: boolean
|
||||
/** Whether values that are input by the user should have whitespace removed from both ends of the string. */
|
||||
auto_trim?: boolean
|
||||
/**
|
||||
* Makes it possible to force the player to choose between the defined strings, creates a dropdown instead of a
|
||||
* textfield. The strings in the dropdown can be localized (translated) and can have a tooltip, see below. If only one
|
||||
* allowed value is given, the settings is forced to be of that value.
|
||||
*/
|
||||
allowed_values?: string[]
|
||||
}
|
||||
/** Setting definitions. See {@link https://wiki.factorio.com/Tutorial:Mod_settings} for more info. */
|
||||
export type SettingDefinition =
|
||||
| BoolSettingDefinition
|
||||
| IntSettingDefinition
|
||||
| DoubleSettingDefinition
|
||||
| StringSettingDefinition
|
||||
|
||||
export interface Data {
|
||||
readonly raw: {
|
||||
[T in SettingDefinition["type"]]: Record<string, Extract<SettingDefinition, { type: T }>>
|
||||
}
|
||||
/**
|
||||
* The `data` table expects a specific format for each item in the table. Missing properties will either fall back to
|
||||
* default values or give an error indicating what's missing. Extra properties that the game isn't looking for are
|
||||
* simply ignored.
|
||||
*/
|
||||
extend(prototypes: SettingDefinition[]): void
|
||||
}
|
||||
/** A mapping of mod names to mod version for all enabled mods. */
|
||||
export type Mods = Record<string, string>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue