d
This commit is contained in:
4
shared/JavaScript/memoryGap.js
Normal file
4
shared/JavaScript/memoryGap.js
Normal file
@@ -0,0 +1,4 @@
|
||||
// @ts-nocheck
|
||||
function memoryGap() {
|
||||
return memorySide() + memorySpace();
|
||||
}
|
||||
3
shared/JavaScript/memorySpace.js
Normal file
3
shared/JavaScript/memorySpace.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function memorySpace() {
|
||||
return 20;
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
func memorySpace() -> Float {
|
||||
return 20
|
||||
}
|
||||
|
||||
func memoryGap() -> Float {
|
||||
return memorySide() + memorySpace()
|
||||
}
|
||||
// @ts-nocheck
|
||||
func memoryGap() -> Float {
|
||||
return memorySide() + memorySpace()
|
||||
}
|
||||
3
shared/Swift/memorySpace.swift
Normal file
3
shared/Swift/memorySpace.swift
Normal file
@@ -0,0 +1,3 @@
|
||||
func memorySpace() -> Float {
|
||||
return 20
|
||||
}
|
||||
12
shared/gen
12
shared/gen
@@ -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
4
shared/memoryGap.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// @ts-nocheck
|
||||
function memoryGap(): number {
|
||||
return memorySide() + memorySpace()
|
||||
}
|
||||
3
shared/memorySpace.ts
Normal file
3
shared/memorySpace.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
function memorySpace(): number {
|
||||
return 20
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
function memorySpace() {
|
||||
return 20
|
||||
}
|
||||
|
||||
function memoryGap() {
|
||||
return memorySide() + memorySpace()
|
||||
}
|
||||
Reference in New Issue
Block a user