Compare commits
2 Commits
33195638ca
...
946cf852d2
Author | SHA1 | Date |
---|---|---|
Kane Wang | 946cf852d2 | |
Kane Wang | f4769057db |
|
@ -14,7 +14,8 @@
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.dataTypes = void 0;
|
exports.dataTypes = void 0;
|
||||||
//Tuple
|
//Tuple
|
||||||
function dataTypes() {
|
function dataTypes()
|
||||||
|
{
|
||||||
const tu = [1, 1, 2,];
|
const tu = [1, 1, 2,];
|
||||||
const toArray = [1, 2, "3",];
|
const toArray = [1, 2, "3",];
|
||||||
const v1 = toArray;
|
const v1 = toArray;
|
||||||
|
@ -22,18 +23,22 @@ function dataTypes() {
|
||||||
console.log(typeof s1);
|
console.log(typeof s1);
|
||||||
let point;
|
let point;
|
||||||
point = { x: 0, y: 0, };
|
point = { x: 0, y: 0, };
|
||||||
function addOne(x, y = 1) {
|
function addOne(x, y = 1)
|
||||||
|
{
|
||||||
return x + y;
|
return x + y;
|
||||||
}
|
}
|
||||||
console.log(addOne(1));
|
console.log(addOne(1));
|
||||||
function allParams(x, y) {
|
function allParams(x, y)
|
||||||
|
{
|
||||||
const z = x + y;
|
const z = x + y;
|
||||||
}
|
}
|
||||||
//剩余参数,数组形式
|
//剩余参数,数组形式
|
||||||
function overplusArgusWithArray(x, ...argus) {
|
function overplusArgusWithArray(x, ...argus)
|
||||||
|
{
|
||||||
return argus.length;
|
return argus.length;
|
||||||
}
|
}
|
||||||
function overplusArugsWithTuple(x, ...argus) {
|
function overplusArugsWithTuple(x, ...argus)
|
||||||
|
{
|
||||||
console.log(`元组形式的参数表${argus},剩余参数的数量${argus.length}。`);
|
console.log(`元组形式的参数表${argus},剩余参数的数量${argus.length}。`);
|
||||||
console.log(argus[2]);
|
console.log(argus[2]);
|
||||||
return argus.length;
|
return argus.length;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-02-09 22:14:30
|
* @Date: 2023-02-09 22:14:30
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-02-12 23:52:33
|
* @LastEditTime: 2023-02-13 09:31:28
|
||||||
* @FilePath: /后端辅助工具/src/main.ts
|
* @FilePath: /后端辅助工具/target/main.js
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-02-09 15:24:20
|
* @Date: 2023-02-09 15:24:20
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-02-13 00:21:52
|
* @LastEditTime: 2023-02-10 10:16:40
|
||||||
* @FilePath: /后端辅助工具/tsconfig.json
|
* @FilePath: /后端辅助工具/tsconfig.json
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
|
@ -13,8 +13,6 @@
|
||||||
"outDir": "./target",
|
"outDir": "./target",
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"target": "ES2015",
|
|
||||||
"module": "CommonJS",
|
|
||||||
},
|
},
|
||||||
// "files": [
|
// "files": [
|
||||||
// "./src/main.ts",
|
// "./src/main.ts",
|
||||||
|
|
Loading…
Reference in New Issue