Compare commits

..

No commits in common. "946cf852d2487b9da1a1c4da412cefd6d27a36bf" and "33195638ca6cd62c760bba9624c78ef3685778e6" have entirely different histories.

3 changed files with 10 additions and 13 deletions

View File

@ -14,8 +14,7 @@
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;
@ -23,22 +22,18 @@ 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;

View File

@ -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-13 09:31:28 * @LastEditTime: 2023-02-12 23:52:33
* @FilePath: //target/main.js * @FilePath: //src/main.ts
* @Description: * @Description:
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.

View File

@ -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-10 10:16:40 * @LastEditTime: 2023-02-13 00:21:52
* @FilePath: //tsconfig.json * @FilePath: //tsconfig.json
* @Description: * @Description:
* *
@ -13,6 +13,8 @@
"outDir": "./target", "outDir": "./target",
"strict": false, "strict": false,
"strictNullChecks": true, "strictNullChecks": true,
"target": "ES2015",
"module": "CommonJS",
}, },
// "files": [ // "files": [
// "./src/main.ts", // "./src/main.ts",