保存进度!

This commit is contained in:
2023-02-13 00:43:14 +08:00
parent 44acd8856a
commit 33195638ca
7 changed files with 130 additions and 76 deletions

View File

@@ -1,15 +1,44 @@
"use strict";
/*
* @Author: Kane
* @Date: 2023-02-10 15:08:53
* @LastEditors: Kane
* @LastEditTime: 2023-02-10 15:15:41
* @LastEditTime: 2023-02-13 00:40:30
* @FilePath: /后端辅助工具/src/DataType/DataType.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
/* eslint */
/*eslint no-unused-vars: "off" */
/*eslint @typescript-eslint/no-unused-vars: "off" */
Object.defineProperty(exports, "__esModule", { value: true });
exports.dataTypes = void 0;
//Tuple
var tu = [1, 1, 2,];
var toArray = [1, 2, "3",];
var v1 = toArray;
function dataTypes() {
const tu = [1, 1, 2,];
const toArray = [1, 2, "3",];
const v1 = toArray;
const s1 = "string";
console.log(typeof s1);
let point;
point = { x: 0, y: 0, };
function addOne(x, y = 1) {
return x + y;
}
console.log(addOne(1));
function allParams(x, y) {
const z = x + y;
}
//剩余参数,数组形式
function overplusArgusWithArray(x, ...argus) {
return argus.length;
}
function overplusArugsWithTuple(x, ...argus) {
console.log(`元组形式的参数表${argus},剩余参数的数量${argus.length}`);
console.log(argus[2]);
return argus.length;
}
overplusArugsWithTuple(1, 2, 3, "test");
console.log(overplusArgusWithArray(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
}
exports.dataTypes = dataTypes;

View File

@@ -1,24 +1,17 @@
var greetings = "Hello, World!";
// console.log( greetings );
var Season;
(function (Season) {
Season[Season["spring"] = 1] = "spring";
Season[Season["summer"] = 2] = "summer";
Season[Season["autumn"] = 3] = "autumn";
Season[Season["winter"] = 4] = "winter";
})(Season || (Season = {}));
;
var ar = [
"1", "2",
];
var ar2 = [
1, 2, 3, "4",
];
var ar3 = [1, 2, 3, 4, 5, "7",];
var today = Season.spring;
function ts() {
var message = "message";
return message;
}
ts();
console.log(today);
"use strict";
/*
* @Author: Kane
* @Date: 2023-02-09 22:14:30
* @LastEditors: Kane
* @LastEditTime: 2023-02-12 23:52:33
* @FilePath: /后端辅助工具/src/main.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const DataType_1 = require("./DataType/DataType");
const greetings = "hello, this is kane's typescript!";
console.log(greetings);
console.log("all");
(0, DataType_1.dataTypes)();