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 });
exports.dataTypes = void 0;
//Tuple
function dataTypes()
{
function dataTypes() {
const tu = [1, 1, 2,];
const toArray = [1, 2, "3",];
const v1 = toArray;
@ -23,22 +22,18 @@ function dataTypes()
console.log(typeof s1);
let point;
point = { x: 0, y: 0, };
function addOne(x, y = 1)
{
function addOne(x, y = 1) {
return x + y;
}
console.log(addOne(1));
function allParams(x, y)
{
function allParams(x, y) {
const z = x + y;
}
//剩余参数,数组形式
function overplusArgusWithArray(x, ...argus)
{
function overplusArgusWithArray(x, ...argus) {
return argus.length;
}
function overplusArugsWithTuple(x, ...argus)
{
function overplusArugsWithTuple(x, ...argus) {
console.log(`元组形式的参数表${argus},剩余参数的数量${argus.length}`);
console.log(argus[2]);
return argus.length;

View File

@ -3,8 +3,8 @@
* @Author: Kane
* @Date: 2023-02-09 22:14:30
* @LastEditors: Kane
* @LastEditTime: 2023-02-13 09:31:28
* @FilePath: //target/main.js
* @LastEditTime: 2023-02-12 23:52:33
* @FilePath: //src/main.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2023-02-09 15:24:20
* @LastEditors: Kane
* @LastEditTime: 2023-02-10 10:16:40
* @LastEditTime: 2023-02-13 00:21:52
* @FilePath: //tsconfig.json
* @Description:
*
@ -13,6 +13,8 @@
"outDir": "./target",
"strict": false,
"strictNullChecks": true,
"target": "ES2015",
"module": "CommonJS",
},
// "files": [
// "./src/main.ts",