init
This commit is contained in:
commit
e271c974ad
87 changed files with 29161 additions and 0 deletions
249
.gitignore
vendored
Normal file
249
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
|
||||
.idea
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/windows,macos,linux,gradle,intellij,visualstudiocode,kotlin
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,macos,linux,gradle,intellij,visualstudiocode,kotlin
|
||||
|
||||
### Intellij ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
.idea/artifacts
|
||||
.idea/compiler.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/modules.xml
|
||||
.idea/*.iml
|
||||
.idea/modules
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### Intellij Patch ###
|
||||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||
|
||||
# *.iml
|
||||
# modules.xml
|
||||
# .idea/misc.xml
|
||||
# *.ipr
|
||||
|
||||
# Sonarlint plugin
|
||||
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
||||
.idea/**/sonarlint/
|
||||
|
||||
# SonarQube Plugin
|
||||
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
||||
.idea/**/sonarIssues.xml
|
||||
|
||||
# Markdown Navigator plugin
|
||||
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
||||
.idea/**/markdown-navigator.xml
|
||||
.idea/**/markdown-navigator-enh.xml
|
||||
.idea/**/markdown-navigator/
|
||||
|
||||
# Cache file creation bug
|
||||
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
||||
.idea/$CACHE_FILE$
|
||||
|
||||
# CodeStream plugin
|
||||
# https://plugins.jetbrains.com/plugin/12206-codestream
|
||||
.idea/codestream.xml
|
||||
|
||||
### Kotlin ###
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
### Linux ###
|
||||
*~
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
### macOS ###
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
### VisualStudioCode ###
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
### VisualStudioCode Patch ###
|
||||
# Ignore all local history of files
|
||||
.history
|
||||
.ionide
|
||||
|
||||
### Windows ###
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
### Gradle Patch ###
|
||||
**/build/
|
||||
|
||||
# Eclipse Gradle plugin generated files
|
||||
# Eclipse Core
|
||||
.project
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/windows,macos,linux,gradle,intellij,visualstudiocode,kotlin
|
||||
137
build.gradle.kts
Normal file
137
build.gradle.kts
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.5.31"
|
||||
}
|
||||
|
||||
group = "dev.adamko.factoriowebmap"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
//repositories {
|
||||
// mavenCentral()
|
||||
// maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
|
||||
//}
|
||||
|
||||
|
||||
kotlin {
|
||||
|
||||
//<editor-fold desc="Native">
|
||||
val hostOs = System.getProperty("os.name")
|
||||
val isMingwX64 = hostOs.startsWith("Windows")
|
||||
val nativeTarget = when {
|
||||
hostOs == "Mac OS X" -> macosX64("native")
|
||||
hostOs == "Linux" -> linuxX64("native")
|
||||
isMingwX64 -> mingwX64("native")
|
||||
else -> throw GradleException(
|
||||
"Host OS '$hostOs' is not supported in Kotlin/Native.")
|
||||
}
|
||||
|
||||
nativeTarget.apply {
|
||||
binaries {
|
||||
executable {
|
||||
entryPoint = "main"
|
||||
}
|
||||
sharedLib {
|
||||
baseName = if (isMingwX64) "libnative" else "native"
|
||||
}
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
val nativeMain by getting {
|
||||
dependencies {
|
||||
implementation("com.soywiz.korlibs.luak:luak:2.4.3")
|
||||
}
|
||||
}
|
||||
val nativeTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
//<editor-fold desc="JS">
|
||||
js(IR) {
|
||||
binaries.executable()
|
||||
browser {
|
||||
commonWebpackConfig {
|
||||
cssSupport.enabled = true
|
||||
}
|
||||
}
|
||||
|
||||
useCommonJs()
|
||||
nodejs()
|
||||
|
||||
compilations.all {
|
||||
packageJson {
|
||||
customField(
|
||||
"scripts", mapOf(
|
||||
"build" to "tstl",
|
||||
"dev" to "tstl --watch",
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
// compilations["main"]
|
||||
// .packageJson {
|
||||
// customField(
|
||||
// "scripts", mapOf(
|
||||
// "build" to "tstl",
|
||||
// "dev" to "tstl --watch",
|
||||
// )
|
||||
// )
|
||||
// }
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
val jsMain by getting {
|
||||
kotlin.srcDir("externals02")
|
||||
// kotlin.srcDir("externals")
|
||||
|
||||
dependencies {
|
||||
|
||||
val kotlinWrappersVersion = "0.0.1-pre.254-kotlin-1.5.31"
|
||||
implementation(
|
||||
project.dependencies.enforcedPlatform(
|
||||
"org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${kotlinWrappersVersion}"
|
||||
)
|
||||
)
|
||||
|
||||
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 = generateExternals))
|
||||
implementation(npm("lua-types", "2.11.0", generateExternals = generateExternals))
|
||||
implementation(npm("typescript", "4.4.3", generateExternals = generateExternals))
|
||||
}
|
||||
}
|
||||
|
||||
val jsTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-js"))
|
||||
}
|
||||
}
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
}
|
||||
|
||||
configure<NodeJsRootExtension> {
|
||||
versions.dukat.version = "0.5.8-rc.4-dev.20211001"
|
||||
// versions.dukat.version = "0.5.8-rc.4"
|
||||
}
|
||||
|
||||
tasks.wrapper {
|
||||
gradleVersion = "7.2"
|
||||
distributionType = Wrapper.DistributionType.ALL
|
||||
}
|
||||
74
externals/CompilerOptions.module_typescript-to-lua.kt
vendored
Normal file
74
externals/CompilerOptions.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
@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.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: dynamic /* typealias OmitIndexSignature = dynamic */) -> Boolean
|
||||
|
||||
external fun validateOptions(options: dynamic /* typealias OmitIndexSignature = dynamic */): Array<Diagnostic>
|
||||
485
externals/LuaAST.module_typescript-to-lua.kt
vendored
Normal file
485
externals/LuaAST.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,485 @@
|
|||
@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
|
||||
111
externals/LuaLib.module_typescript-to-lua.kt
vendored
Normal file
111
externals/LuaLib.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
@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" */
|
||||
}
|
||||
101
externals/LuaPrinter.module_typescript-to-lua.kt
vendored
Normal file
101
externals/LuaPrinter.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
@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
|
||||
}
|
||||
}
|
||||
79
externals/context.module_typescript-to-lua.kt
vendored
Normal file
79
externals/context.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
@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 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 val diagnostics: Array<Diagnostic>
|
||||
open val checker: DiagnosticsProducingTypeChecker
|
||||
open val resolver: EmitResolver
|
||||
open val options: dynamic /* typealias OmitIndexSignature = dynamic */
|
||||
open val luaTarget: LuaTarget
|
||||
open val isModule: Boolean
|
||||
open val 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>
|
||||
}
|
||||
38
externals/index.module_typescript-to-lua.kt
vendored
Normal file
38
externals/index.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
@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 tsstdlib.Record
|
||||
|
||||
external fun transpileFiles(rootNames: Array<String>, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, writeFile: WriteFileCallback = definedExternally): EmitResult
|
||||
|
||||
external fun transpileProject(configFileName: String, optionsToExtend: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, writeFile: WriteFileCallback = definedExternally): EmitResult
|
||||
|
||||
external interface TranspileVirtualProjectResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var transpiledFiles: Array<TranspiledFile>
|
||||
}
|
||||
|
||||
external fun transpileVirtualProject(files: Record<String, String>, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally): TranspileVirtualProjectResult
|
||||
|
||||
external interface TranspileStringResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var file: TranspiledFile?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun transpileString(main: String, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally): TranspileStringResult
|
||||
49
externals/lib.es2015.collection.kt
vendored
Normal file
49
externals/lib.es2015.collection.kt
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
@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 */
|
||||
val size: Number
|
||||
}
|
||||
|
||||
external interface MapConstructor {
|
||||
val 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
|
||||
val size: Number
|
||||
}
|
||||
|
||||
external interface SetConstructor {
|
||||
val prototype: Set<Any>
|
||||
}
|
||||
54
externals/lib.es2015.iterable.kt
vendored
Normal file
54
externals/lib.es2015.iterable.kt
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
@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 {
|
||||
val 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
externals/lib.es5.Intl.module_dukat.kt
vendored
Normal file
220
externals/lib.es5.Intl.module_dukat.kt
vendored
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
@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
externals/lib.es5.kt
vendored
Normal file
69
externals/lib.es5.kt
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
@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
|
||||
val 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> {
|
||||
val 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
|
||||
val 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> {
|
||||
val length: Number
|
||||
@nativeGetter
|
||||
operator fun get(n: Number): T?
|
||||
@nativeSetter
|
||||
operator fun set(n: Number, value: T)
|
||||
}
|
||||
|
||||
typealias Record<K, T> = Any
|
||||
20
externals/lib.scripthost.kt
vendored
Normal file
20
externals/lib.scripthost.kt
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
@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
externals/nonDeclarations.ts.kt
vendored
Normal file
114
externals/nonDeclarations.ts.kt
vendored
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
@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
|
||||
33
externals/output-collector.module_typescript-to-lua.kt
vendored
Normal file
33
externals/output-collector.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@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
|
||||
}
|
||||
25
externals/parse.module_typescript-to-lua.kt
vendored
Normal file
25
externals/parse.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
@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 {
|
||||
override var options: dynamic /* typealias OmitIndexSignature = dynamic */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun updateParsedConfigFile(parsedConfigFile: ts.ParsedCommandLine): ParsedCommandLine
|
||||
|
||||
external fun parseCommandLine(args: Array<String>): ParsedCommandLine
|
||||
24
externals/plugins.module_typescript-to-lua.kt
vendored
Normal file
24
externals/plugins.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
@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
|
||||
}
|
||||
48
externals/report.module_typescript-to-lua.kt
vendored
Normal file
48
externals/report.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
@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
|
||||
192
externals/source-map.module_source-map.kt
vendored
Normal file
192
externals/source-map.module_source-map.kt
vendored
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
@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
|
||||
}
|
||||
}
|
||||
40
externals/transpile.module_typescript-to-lua.kt
vendored
Normal file
40
externals/transpile.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
@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
|
||||
55
externals/transpiler.module_typescript-to-lua.kt
vendored
Normal file
55
externals/transpiler.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
@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
|
||||
18
externals/tsconfig.module_typescript-to-lua.kt
vendored
Normal file
18
externals/tsconfig.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
@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.System
|
||||
|
||||
external fun parseConfigFileWithSystem(configFileName: String, commandLineOptions: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, system: System = definedExternally): ParsedCommandLine
|
||||
19
externals/typescript.module_typescript.kt
vendored
Normal file
19
externals/typescript.module_typescript.kt
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
@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)
|
||||
20
externals/typescript.ts.ScriptSnapshot.module_typescript.kt
vendored
Normal file
20
externals/typescript.ts.ScriptSnapshot.module_typescript.kt
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
@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
|
||||
8236
externals/typescript.ts.module_typescript.kt
vendored
Normal file
8236
externals/typescript.ts.module_typescript.kt
vendored
Normal file
File diff suppressed because it is too large
Load diff
101
externals/typescript.ts.server.module_typescript.kt
vendored
Normal file
101
externals/typescript.ts.server.module_typescript.kt
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
@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 {
|
||||
val kind: String /* "action::set" | "action::invalidate" | "event::typesRegistry" | "action::packageInstalled" | "event::beginInstallTypes" | "event::endInstallTypes" | "event::initializationFailed" */
|
||||
}
|
||||
|
||||
external interface TypingInstallerRequestWithProjectName {
|
||||
val projectName: String
|
||||
}
|
||||
|
||||
external interface DiscoverTypings : TypingInstallerRequestWithProjectName {
|
||||
val fileNames: Array<String>
|
||||
val projectRootPath: String /* String & `T$3` */
|
||||
val compilerOptions: CompilerOptions
|
||||
val watchOptions: WatchOptions?
|
||||
get() = definedExternally
|
||||
val typeAcquisition: TypeAcquisition
|
||||
val unresolvedImports: SortedReadonlyArray<String>
|
||||
val cachePath: String?
|
||||
get() = definedExternally
|
||||
val kind: String /* "discover" */
|
||||
}
|
||||
|
||||
external interface CloseProject : TypingInstallerRequestWithProjectName {
|
||||
val kind: String /* "closeProject" */
|
||||
}
|
||||
|
||||
external interface TypesRegistryRequest {
|
||||
val kind: String /* "typesRegistry" */
|
||||
}
|
||||
|
||||
external interface InstallPackageRequest : TypingInstallerRequestWithProjectName {
|
||||
val kind: String /* "installPackage" */
|
||||
val fileName: String /* String & `T$3` */
|
||||
val packageName: String
|
||||
val projectRootPath: String /* String & `T$3` */
|
||||
}
|
||||
|
||||
external interface PackageInstalledResponse : ProjectResponse {
|
||||
override val kind: String /* "action::packageInstalled" */
|
||||
val success: Boolean
|
||||
val message: String
|
||||
}
|
||||
|
||||
external interface InitializationFailedResponse : TypingInstallerResponse {
|
||||
override val kind: String /* "event::initializationFailed" */
|
||||
val message: String
|
||||
val stack: String?
|
||||
get() = definedExternally
|
||||
}
|
||||
|
||||
external interface ProjectResponse : TypingInstallerResponse {
|
||||
val projectName: String
|
||||
}
|
||||
|
||||
external interface InvalidateCachedTypings : ProjectResponse {
|
||||
override val kind: String /* "action::invalidate" */
|
||||
}
|
||||
|
||||
external interface InstallTypes : ProjectResponse {
|
||||
override val kind: String /* "event::beginInstallTypes" | "event::endInstallTypes" */
|
||||
val eventId: Number
|
||||
val typingsInstallerVersion: String
|
||||
val packagesToInstall: Array<String>
|
||||
}
|
||||
|
||||
external interface BeginInstallTypes : InstallTypes {
|
||||
override val kind: String /* "event::beginInstallTypes" */
|
||||
}
|
||||
|
||||
external interface EndInstallTypes : InstallTypes {
|
||||
override val kind: String /* "event::endInstallTypes" */
|
||||
val installSuccess: Boolean
|
||||
}
|
||||
|
||||
external interface SetTypings : ProjectResponse {
|
||||
val typeAcquisition: TypeAcquisition
|
||||
val compilerOptions: CompilerOptions
|
||||
val typings: Array<String>
|
||||
val unresolvedImports: SortedReadonlyArray<String>
|
||||
override val kind: String /* "action::set" */
|
||||
}
|
||||
46
externals/utils.module_typescript-to-lua.kt
vendored
Normal file
46
externals/utils.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
@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
|
||||
}
|
||||
38
externals/visitors.module_typescript-to-lua.kt
vendored
Normal file
38
externals/visitors.module_typescript-to-lua.kt
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
@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>>>
|
||||
74
externals02/CompilerOptions.module_typescript-to-lua.kt
Normal file
74
externals02/CompilerOptions.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
@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.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: dynamic /* typealias OmitIndexSignature = dynamic */) -> Boolean
|
||||
|
||||
external fun validateOptions(options: dynamic /* typealias OmitIndexSignature = dynamic */): Array<Diagnostic>
|
||||
473
externals02/LuaAST.module_typescript-to-lua.kt
Normal file
473
externals02/LuaAST.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,473 @@
|
|||
@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 = definedExternally, tsOriginal: ts.Node = definedExternally): UnaryExpression
|
||||
|
||||
external fun createUnaryExpression(operand: Expression, operator: SyntaxKind = definedExternally): 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$18`? */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isIdentifier(node: Node): Boolean
|
||||
|
||||
external fun createIdentifier(text: String, tsOriginal: ts.Node = definedExternally, symbolId: Number /* Number & `T$18` */ = 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$21` {
|
||||
var statements: dynamic /* JsTuple<ReturnStatement> */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun isInlineFunctionExpression(expression: FunctionExpression): Boolean
|
||||
111
externals02/LuaLib.module_typescript-to-lua.kt
Normal file
111
externals02/LuaLib.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
@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" */
|
||||
}
|
||||
101
externals02/LuaPrinter.module_typescript-to-lua.kt
Normal file
101
externals02/LuaPrinter.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
@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
|
||||
}
|
||||
}
|
||||
79
externals02/context.module_typescript-to-lua.kt
Normal file
79
externals02/context.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
@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 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 val diagnostics: Array<Diagnostic>
|
||||
open val checker: DiagnosticsProducingTypeChecker
|
||||
open val resolver: EmitResolver
|
||||
open val options: dynamic /* typealias OmitIndexSignature = dynamic */
|
||||
open val luaTarget: LuaTarget
|
||||
open val isModule: Boolean
|
||||
open val 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>
|
||||
}
|
||||
38
externals02/index.module_typescript-to-lua.kt
Normal file
38
externals02/index.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
@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 tsstdlib.Record
|
||||
|
||||
external fun transpileFiles(rootNames: Array<String>, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, writeFile: WriteFileCallback = definedExternally): EmitResult
|
||||
|
||||
external fun transpileProject(configFileName: String, optionsToExtend: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, writeFile: WriteFileCallback = definedExternally): EmitResult
|
||||
|
||||
external interface TranspileVirtualProjectResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var transpiledFiles: Array<TranspiledFile>
|
||||
}
|
||||
|
||||
external fun transpileVirtualProject(files: Record<String, String>, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally): TranspileVirtualProjectResult
|
||||
|
||||
external interface TranspileStringResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var file: TranspiledFile?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun transpileString(main: String, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally): TranspileStringResult
|
||||
49
externals02/lib.es2015.collection.kt
Normal file
49
externals02/lib.es2015.collection.kt
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
@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 */
|
||||
val size: Number
|
||||
}
|
||||
|
||||
external interface MapConstructor {
|
||||
val 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
|
||||
val size: Number
|
||||
}
|
||||
|
||||
external interface SetConstructor {
|
||||
val prototype: Set<Any>
|
||||
}
|
||||
54
externals02/lib.es2015.iterable.kt
Normal file
54
externals02/lib.es2015.iterable.kt
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
@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 {
|
||||
val 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
externals02/lib.es5.Intl.module_dukat.kt
Normal file
220
externals02/lib.es5.Intl.module_dukat.kt
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
@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
externals02/lib.es5.kt
Normal file
69
externals02/lib.es5.kt
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
@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
|
||||
val 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> {
|
||||
val 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
|
||||
val 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> {
|
||||
val length: Number
|
||||
@nativeGetter
|
||||
operator fun get(n: Number): T?
|
||||
@nativeSetter
|
||||
operator fun set(n: Number, value: T)
|
||||
}
|
||||
|
||||
typealias Record<K, T> = Any
|
||||
20
externals02/lib.scripthost.kt
Normal file
20
externals02/lib.scripthost.kt
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
@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
|
||||
}
|
||||
122
externals02/nonDeclarations.ts.kt
Normal file
122
externals02/nonDeclarations.ts.kt
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
@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>
|
||||
|
||||
typealias DotDotDotToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias QuestionToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias ExclamationToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias ColonToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias EqualsToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias AsteriskToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias EqualsGreaterThanToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias PlusToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias MinusToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias QuestionDotToken = PunctuationToken<SyntaxKind>
|
||||
|
||||
typealias AssertsKeyword = KeywordToken<SyntaxKind>
|
||||
|
||||
typealias AwaitKeyword = KeywordToken<SyntaxKind>
|
||||
|
||||
typealias AwaitKeywordToken = AwaitKeyword
|
||||
|
||||
typealias AssertsToken = AssertsKeyword
|
||||
|
||||
typealias AbstractKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias AsyncKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias ConstKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias DeclareKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias DefaultKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias ExportKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias PrivateKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias ProtectedKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias PublicKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias ReadonlyKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias OverrideKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
typealias StaticKeyword = ModifierToken<SyntaxKind>
|
||||
|
||||
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 ErrorCallback = (message: DiagnosticMessage, length: Number) -> Unit
|
||||
|
||||
typealias DiagnosticReporter = (diagnostic: Diagnostic) -> Unit
|
||||
|
||||
typealias WatchStatusReporter = (diagnostic: Diagnostic, newLine: String, options: CompilerOptions, errorCount: Number) -> Unit
|
||||
|
||||
typealias CreateProgram<T> = (rootNames: Array<String>?, options: CompilerOptions?, host: CompilerHost, oldProgram: T, configFileParsingDiagnostics: Array<Diagnostic>, projectReferences: Array<ProjectReference>?) -> T
|
||||
|
||||
typealias ReportEmitErrorSummary = (errorCount: Number) -> Unit
|
||||
|
||||
typealias CodeActionCommand = InstallPackageAction
|
||||
33
externals02/output-collector.module_typescript-to-lua.kt
Normal file
33
externals02/output-collector.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@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
|
||||
}
|
||||
25
externals02/parse.module_typescript-to-lua.kt
Normal file
25
externals02/parse.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
@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 {
|
||||
override var options: dynamic /* typealias OmitIndexSignature = dynamic */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun updateParsedConfigFile(parsedConfigFile: ts.ParsedCommandLine): ParsedCommandLine
|
||||
|
||||
external fun parseCommandLine(args: Array<String>): ParsedCommandLine
|
||||
24
externals02/plugins.module_typescript-to-lua.kt
Normal file
24
externals02/plugins.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
@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
|
||||
}
|
||||
48
externals02/report.module_typescript-to-lua.kt
Normal file
48
externals02/report.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
@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$17` {
|
||||
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$17`
|
||||
|
||||
external fun createDiagnosticReporter(pretty: Boolean, system: System = definedExternally): DiagnosticReporter
|
||||
192
externals02/source-map.module_source-map.kt
Normal file
192
externals02/source-map.module_source-map.kt
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
@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$23` */): NullableMappedPosition
|
||||
fun generatedPositionFor(originalPosition: MappedPosition /* MappedPosition & `T$23` */): 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
|
||||
}
|
||||
}
|
||||
40
externals02/transpile.module_typescript-to-lua.kt
Normal file
40
externals02/transpile.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
@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
|
||||
55
externals02/transpiler.module_typescript-to-lua.kt
Normal file
55
externals02/transpiler.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
@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$24` {
|
||||
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$24`
|
||||
}
|
||||
|
||||
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
|
||||
18
externals02/tsconfig.module_typescript-to-lua.kt
Normal file
18
externals02/tsconfig.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
@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.System
|
||||
|
||||
external fun parseConfigFileWithSystem(configFileName: String, commandLineOptions: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, system: System = definedExternally): ParsedCommandLine
|
||||
19
externals02/typescript.module_typescript.kt
Normal file
19
externals02/typescript.module_typescript.kt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
@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)
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
@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
|
||||
8129
externals02/typescript.ts.module_typescript.kt
Normal file
8129
externals02/typescript.ts.module_typescript.kt
Normal file
File diff suppressed because it is too large
Load diff
101
externals02/typescript.ts.server.module_typescript.kt
Normal file
101
externals02/typescript.ts.server.module_typescript.kt
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
@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 {
|
||||
val kind: String /* "action::set" | "action::invalidate" | "event::typesRegistry" | "action::packageInstalled" | "event::beginInstallTypes" | "event::endInstallTypes" | "event::initializationFailed" */
|
||||
}
|
||||
|
||||
external interface TypingInstallerRequestWithProjectName {
|
||||
val projectName: String
|
||||
}
|
||||
|
||||
external interface DiscoverTypings : TypingInstallerRequestWithProjectName {
|
||||
val fileNames: Array<String>
|
||||
val projectRootPath: String /* String & `T$3` */
|
||||
val compilerOptions: CompilerOptions
|
||||
val watchOptions: WatchOptions?
|
||||
get() = definedExternally
|
||||
val typeAcquisition: TypeAcquisition
|
||||
val unresolvedImports: SortedReadonlyArray<String>
|
||||
val cachePath: String?
|
||||
get() = definedExternally
|
||||
val kind: String /* "discover" */
|
||||
}
|
||||
|
||||
external interface CloseProject : TypingInstallerRequestWithProjectName {
|
||||
val kind: String /* "closeProject" */
|
||||
}
|
||||
|
||||
external interface TypesRegistryRequest {
|
||||
val kind: String /* "typesRegistry" */
|
||||
}
|
||||
|
||||
external interface InstallPackageRequest : TypingInstallerRequestWithProjectName {
|
||||
val kind: String /* "installPackage" */
|
||||
val fileName: String /* String & `T$3` */
|
||||
val packageName: String
|
||||
val projectRootPath: String /* String & `T$3` */
|
||||
}
|
||||
|
||||
external interface PackageInstalledResponse : ProjectResponse {
|
||||
override val kind: String /* "action::packageInstalled" */
|
||||
val success: Boolean
|
||||
val message: String
|
||||
}
|
||||
|
||||
external interface InitializationFailedResponse : TypingInstallerResponse {
|
||||
override val kind: String /* "event::initializationFailed" */
|
||||
val message: String
|
||||
val stack: String?
|
||||
get() = definedExternally
|
||||
}
|
||||
|
||||
external interface ProjectResponse : TypingInstallerResponse {
|
||||
val projectName: String
|
||||
}
|
||||
|
||||
external interface InvalidateCachedTypings : ProjectResponse {
|
||||
override val kind: String /* "action::invalidate" */
|
||||
}
|
||||
|
||||
external interface InstallTypes : ProjectResponse {
|
||||
override val kind: String /* "event::beginInstallTypes" | "event::endInstallTypes" */
|
||||
val eventId: Number
|
||||
val typingsInstallerVersion: String
|
||||
val packagesToInstall: Array<String>
|
||||
}
|
||||
|
||||
external interface BeginInstallTypes : InstallTypes {
|
||||
override val kind: String /* "event::beginInstallTypes" */
|
||||
}
|
||||
|
||||
external interface EndInstallTypes : InstallTypes {
|
||||
override val kind: String /* "event::endInstallTypes" */
|
||||
val installSuccess: Boolean
|
||||
}
|
||||
|
||||
external interface SetTypings : ProjectResponse {
|
||||
val typeAcquisition: TypeAcquisition
|
||||
val compilerOptions: CompilerOptions
|
||||
val typings: Array<String>
|
||||
val unresolvedImports: SortedReadonlyArray<String>
|
||||
override val kind: String /* "action::set" */
|
||||
}
|
||||
46
externals02/utils.module_typescript-to-lua.kt
Normal file
46
externals02/utils.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
@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
|
||||
}
|
||||
38
externals02/visitors.module_typescript-to-lua.kt
Normal file
38
externals02/visitors.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
@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>>>
|
||||
74
externals03/CompilerOptions.module_typescript-to-lua.kt
Normal file
74
externals03/CompilerOptions.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
@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.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: dynamic /* typealias OmitIndexSignature = dynamic */) -> Boolean
|
||||
|
||||
external fun validateOptions(options: dynamic /* typealias OmitIndexSignature = dynamic */): Array<Diagnostic>
|
||||
485
externals03/LuaAST.module_typescript-to-lua.kt
Normal file
485
externals03/LuaAST.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,485 @@
|
|||
@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
|
||||
111
externals03/LuaLib.module_typescript-to-lua.kt
Normal file
111
externals03/LuaLib.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
@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" */
|
||||
}
|
||||
101
externals03/LuaPrinter.module_typescript-to-lua.kt
Normal file
101
externals03/LuaPrinter.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
@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
|
||||
}
|
||||
}
|
||||
79
externals03/context.module_typescript-to-lua.kt
Normal file
79
externals03/context.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
@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 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 val diagnostics: Array<Diagnostic>
|
||||
open val checker: DiagnosticsProducingTypeChecker
|
||||
open val resolver: EmitResolver
|
||||
open val options: dynamic /* typealias OmitIndexSignature = dynamic */
|
||||
open val luaTarget: LuaTarget
|
||||
open val isModule: Boolean
|
||||
open val 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>
|
||||
}
|
||||
38
externals03/index.module_typescript-to-lua.kt
Normal file
38
externals03/index.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
@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 tsstdlib.Record
|
||||
|
||||
external fun transpileFiles(rootNames: Array<String>, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, writeFile: WriteFileCallback = definedExternally): EmitResult
|
||||
|
||||
external fun transpileProject(configFileName: String, optionsToExtend: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, writeFile: WriteFileCallback = definedExternally): EmitResult
|
||||
|
||||
external interface TranspileVirtualProjectResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var transpiledFiles: Array<TranspiledFile>
|
||||
}
|
||||
|
||||
external fun transpileVirtualProject(files: Record<String, String>, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally): TranspileVirtualProjectResult
|
||||
|
||||
external interface TranspileStringResult {
|
||||
var diagnostics: Array<Diagnostic>
|
||||
var file: TranspiledFile?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun transpileString(main: String, options: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally): TranspileStringResult
|
||||
49
externals03/lib.es2015.collection.kt
Normal file
49
externals03/lib.es2015.collection.kt
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
@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 */
|
||||
val size: Number
|
||||
}
|
||||
|
||||
external interface MapConstructor {
|
||||
val 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
|
||||
val size: Number
|
||||
}
|
||||
|
||||
external interface SetConstructor {
|
||||
val prototype: Set<Any>
|
||||
}
|
||||
54
externals03/lib.es2015.iterable.kt
Normal file
54
externals03/lib.es2015.iterable.kt
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
@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 {
|
||||
val 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
externals03/lib.es5.Intl.module_dukat.kt
Normal file
220
externals03/lib.es5.Intl.module_dukat.kt
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
@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
externals03/lib.es5.kt
Normal file
69
externals03/lib.es5.kt
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
@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
|
||||
val 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> {
|
||||
val 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
|
||||
val 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> {
|
||||
val length: Number
|
||||
@nativeGetter
|
||||
operator fun get(n: Number): T?
|
||||
@nativeSetter
|
||||
operator fun set(n: Number, value: T)
|
||||
}
|
||||
|
||||
typealias Record<K, T> = Any
|
||||
20
externals03/lib.scripthost.kt
Normal file
20
externals03/lib.scripthost.kt
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
@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
externals03/nonDeclarations.ts.kt
Normal file
114
externals03/nonDeclarations.ts.kt
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
@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
|
||||
33
externals03/output-collector.module_typescript-to-lua.kt
Normal file
33
externals03/output-collector.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@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
|
||||
}
|
||||
25
externals03/parse.module_typescript-to-lua.kt
Normal file
25
externals03/parse.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
@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 {
|
||||
override var options: dynamic /* typealias OmitIndexSignature = dynamic */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
external fun updateParsedConfigFile(parsedConfigFile: ts.ParsedCommandLine): ParsedCommandLine
|
||||
|
||||
external fun parseCommandLine(args: Array<String>): ParsedCommandLine
|
||||
24
externals03/plugins.module_typescript-to-lua.kt
Normal file
24
externals03/plugins.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
@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
|
||||
}
|
||||
48
externals03/report.module_typescript-to-lua.kt
Normal file
48
externals03/report.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
@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
|
||||
192
externals03/source-map.module_source-map.kt
Normal file
192
externals03/source-map.module_source-map.kt
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
@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
|
||||
}
|
||||
}
|
||||
40
externals03/transpile.module_typescript-to-lua.kt
Normal file
40
externals03/transpile.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
@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
|
||||
55
externals03/transpiler.module_typescript-to-lua.kt
Normal file
55
externals03/transpiler.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
@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
|
||||
18
externals03/tsconfig.module_typescript-to-lua.kt
Normal file
18
externals03/tsconfig.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
@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.System
|
||||
|
||||
external fun parseConfigFileWithSystem(configFileName: String, commandLineOptions: dynamic /* typealias OmitIndexSignature = dynamic */ = definedExternally, system: System = definedExternally): ParsedCommandLine
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
@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
|
||||
5914
externals03/typescript.ts.module_typescript.kt
Normal file
5914
externals03/typescript.ts.module_typescript.kt
Normal file
File diff suppressed because it is too large
Load diff
46
externals03/utils.module_typescript-to-lua.kt
Normal file
46
externals03/utils.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
@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
|
||||
}
|
||||
38
externals03/visitors.module_typescript-to-lua.kt
Normal file
38
externals03/visitors.module_typescript-to-lua.kt
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
@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>>>
|
||||
4
gradle.properties
Normal file
4
gradle.properties
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
kotlin.js.compiler=ir
|
||||
kotlin.mpp.stability.nowarn=true
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
kotlin.native.enableDependencyPropagation=false
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
5
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
5
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
234
gradlew
vendored
Normal file
234
gradlew
vendored
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
89
gradlew.bat
vendored
Normal file
89
gradlew.bat
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
31
settings.gradle.kts
Normal file
31
settings.gradle.kts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
rootProject.name = "factorio-web-map"
|
||||
|
||||
|
||||
enableFeaturePreview("VERSION_CATALOGS")
|
||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
dependencyResolutionManagement {
|
||||
|
||||
// repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven ("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
|
||||
}
|
||||
|
||||
pluginManagement {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
8
src/jsMain/kotlin/main.kt
Normal file
8
src/jsMain/kotlin/main.kt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fun main() {
|
||||
println("Hello, Kotlin/JS!")
|
||||
}
|
||||
|
||||
//@JsModule("typed-factorio")
|
||||
//@JsNonModule
|
||||
////@JsModule
|
||||
//external fun
|
||||
3
src/nativeMain/kotlin/Main.kt
Normal file
3
src/nativeMain/kotlin/Main.kt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fun main() {
|
||||
println("Hello, Kotlin/Native!")
|
||||
}
|
||||
27
src/nativeMain/kotlin/example/hello.kt
Normal file
27
src/nativeMain/kotlin/example/hello.kt
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package example
|
||||
|
||||
import org.luaj.vm2.LuaBoolean
|
||||
import org.luaj.vm2.LuaValue
|
||||
|
||||
|
||||
object Object {
|
||||
val field = "A"
|
||||
}
|
||||
|
||||
class Clazz {
|
||||
fun memberFunction(p: Int): ULong = 42UL
|
||||
}
|
||||
|
||||
fun forIntegers(b: Byte, s: Short, i: UInt, l: Long) {}
|
||||
fun forFloats(f: Float, d: Double) {}
|
||||
|
||||
fun strings(str: String): String {
|
||||
return "That is '$str' from C"
|
||||
}
|
||||
|
||||
val globalString = "A global String"
|
||||
|
||||
fun testingLuaBooleanElephant() {
|
||||
val b: LuaBoolean = LuaValue.TRUE
|
||||
println(b)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue