This commit is contained in:
Михаил Капелько
2023-06-01 20:05:50 +03:00
parent 79cb34de80
commit 7156a633ff
14 changed files with 54 additions and 42 deletions

View File

@@ -0,0 +1,4 @@
// @ts-nocheck
function memoryGap() {
return memorySide() + memorySpace();
}

View File

@@ -0,0 +1,3 @@
function memorySpace() {
return 20;
}

View File

@@ -1,7 +1,4 @@
func memorySpace() -> Float {
return 20
}
func memoryGap() -> Float {
return memorySide() + memorySpace()
}
// @ts-nocheck
func memoryGap() -> Float {
return memorySide() + memorySpace()
}

View File

@@ -0,0 +1,3 @@
func memorySpace() -> Float {
return 20
}

View File

@@ -2,6 +2,14 @@
SCRIPT_DIR=$(cd "$(dirname "$0")" ; pwd -P)
tsc $SCRIPT_DIR/memorySide.ts --outfile $SCRIPT_DIR/JavaScript/memorySide.js
$SCRIPT_DIR/../toSwift $SCRIPT_DIR/memorySide.ts $SCRIPT_DIR/Swift/memorySide.swift
FILES=(
memoryGap
memorySide
memorySpace
)
for file in ${FILES[*]}; do
tsc $SCRIPT_DIR/$file.ts --outfile $SCRIPT_DIR/JavaScript/$file.js
$SCRIPT_DIR/../toSwift $SCRIPT_DIR/$file.ts $SCRIPT_DIR/Swift/$file.swift
done

4
shared/memoryGap.ts Normal file
View File

@@ -0,0 +1,4 @@
// @ts-nocheck
function memoryGap(): number {
return memorySide() + memorySpace()
}

3
shared/memorySpace.ts Normal file
View File

@@ -0,0 +1,3 @@
function memorySpace(): number {
return 20
}

View File

@@ -1,7 +0,0 @@
function memorySpace() {
return 20
}
function memoryGap() {
return memorySide() + memorySpace()
}