Merge branch 'feature-requirement' of http://222.76.244.118:3000/CPICXIM/it-console into feature-requirement
This commit is contained in:
		@@ -53,7 +53,8 @@ module.exports = {
 | 
			
		||||
        "no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
 | 
			
		||||
        // "comma-spacing": ["error", { "before": false, "after": true, },],
 | 
			
		||||
        "brace-style": ["error", "allman", { allowSingleLine: true, },],
 | 
			
		||||
        "@typescript-eslint/no-extra-semi": "off",
 | 
			
		||||
        "prefer-const": "warn",
 | 
			
		||||
        "@typescript-eslint/no-extra-semi": "off",
 | 
			
		||||
        "@typescript-eslint/no-inferrable-types": "off",
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^5.51.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^5.51.0",
 | 
			
		||||
    "eslint": "^8.33.0"
 | 
			
		||||
  }
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@typescript-eslint/eslint-plugin": "^5.51.0",
 | 
			
		||||
        "@typescript-eslint/parser": "^5.51.0",
 | 
			
		||||
        "eslint": "^8.33.0"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-02-10 15:08:53
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-02-11 00:12:33
 | 
			
		||||
 * @LastEditTime: 2023-02-13 00:40:30
 | 
			
		||||
 * @FilePath: /后端辅助工具/src/DataType/DataType.ts
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
@@ -13,13 +13,55 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//Tuple
 | 
			
		||||
const tu: readonly [number, number, number] = [1, 1, 2,];
 | 
			
		||||
function dataTypes()
 | 
			
		||||
{
 | 
			
		||||
    const tu: readonly [number, number, number] = [1, 1, 2,];
 | 
			
		||||
 | 
			
		||||
const toArray: [number, number, string] = [1, 2, "3",];
 | 
			
		||||
const v1: (number | string)[] = toArray;
 | 
			
		||||
    const toArray: [number, number, string] = [1, 2, "3",];
 | 
			
		||||
    const v1: (number | string)[] = toArray;
 | 
			
		||||
 | 
			
		||||
const s1 = "string";
 | 
			
		||||
    const s1 = "string";
 | 
			
		||||
 | 
			
		||||
console.log(typeof s1);
 | 
			
		||||
    console.log(typeof s1);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    let point: {
 | 
			
		||||
        x: number,
 | 
			
		||||
        y: number,
 | 
			
		||||
    };
 | 
			
		||||
    point = { x: 0, y: 0, };
 | 
			
		||||
 | 
			
		||||
    function addOne(x: number, y: number = 1): number
 | 
			
		||||
    {
 | 
			
		||||
        return x + y;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    console.log(addOne(1));
 | 
			
		||||
 | 
			
		||||
    function allParams(x: number, y: number): void 
 | 
			
		||||
    {
 | 
			
		||||
        const z = x + y;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //剩余参数,数组形式
 | 
			
		||||
    function overplusArgusWithArray(x: number, ...argus: number[]): number
 | 
			
		||||
    {
 | 
			
		||||
        return argus.length;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function overplusArugsWithTuple(x: number, ...argus: [number, number, string]): number
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        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));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export { dataTypes };
 | 
			
		||||
@@ -1,36 +1,19 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @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. 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
const greetings = "Hello, World!";
 | 
			
		||||
import { dataTypes } from "./DataType/DataType";
 | 
			
		||||
 | 
			
		||||
// console.log( greetings );
 | 
			
		||||
const greetings = "hello, this is kane's typescript!";
 | 
			
		||||
 | 
			
		||||
enum Season
 | 
			
		||||
{
 | 
			
		||||
    spring = 1,
 | 
			
		||||
    summer,
 | 
			
		||||
    autumn,
 | 
			
		||||
    winter,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const ar: string[] = [
 | 
			
		||||
    "1", "2",
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
const ar2: (string | number)[] = [
 | 
			
		||||
    1, 2, 3, "4",
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
const ar3: readonly (string | number)[] = [1, 2, 3, 4, 5, "7",];
 | 
			
		||||
 | 
			
		||||
const today = Season.spring;
 | 
			
		||||
 | 
			
		||||
function ts(): string
 | 
			
		||||
{
 | 
			
		||||
    const message = "message";
 | 
			
		||||
 | 
			
		||||
    return message;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ts();
 | 
			
		||||
 | 
			
		||||
console.log(today);
 | 
			
		||||
console.log(greetings);
 | 
			
		||||
console.log("all");
 | 
			
		||||
 | 
			
		||||
dataTypes();
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,9 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-02-10 15:08:53
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-02-11 00:12:33
 | 
			
		||||
 * @LastEditTime: 2023-02-13 00:40:30
 | 
			
		||||
 * @FilePath: /后端辅助工具/src/DataType/DataType.ts
 | 
			
		||||
 * @Description:
 | 
			
		||||
 *
 | 
			
		||||
@@ -10,9 +11,39 @@
 | 
			
		||||
 */
 | 
			
		||||
/*eslint no-unused-vars: "off" */
 | 
			
		||||
/*eslint @typescript-eslint/no-unused-vars: "off" */
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.dataTypes = void 0;
 | 
			
		||||
//Tuple
 | 
			
		||||
const tu = [1, 1, 2,];
 | 
			
		||||
const toArray = [1, 2, "3",];
 | 
			
		||||
const v1 = toArray;
 | 
			
		||||
const s1 = "string";
 | 
			
		||||
console.log(typeof s1);
 | 
			
		||||
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;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,24 +1,17 @@
 | 
			
		||||
const 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 = {}));
 | 
			
		||||
;
 | 
			
		||||
const ar = [
 | 
			
		||||
    "1", "2",
 | 
			
		||||
];
 | 
			
		||||
const ar2 = [
 | 
			
		||||
    1, 2, 3, "4",
 | 
			
		||||
];
 | 
			
		||||
const ar3 = [1, 2, 3, 4, 5, "7",];
 | 
			
		||||
const today = Season.spring;
 | 
			
		||||
function ts() {
 | 
			
		||||
    const message = "message";
 | 
			
		||||
    return message;
 | 
			
		||||
}
 | 
			
		||||
ts();
 | 
			
		||||
console.log(today);
 | 
			
		||||
"use strict";
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-02-09 22:14:30
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-02-13 09:31:28
 | 
			
		||||
 * @FilePath: /后端辅助工具/target/main.js
 | 
			
		||||
 * @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)();
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-02-09 15:24:20
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-02-13 09:26:45
 | 
			
		||||
 * @LastEditTime: 2023-02-10 10:16:40
 | 
			
		||||
 * @FilePath: /后端辅助工具/tsconfig.json
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
@@ -13,19 +13,21 @@
 | 
			
		||||
        "outDir": "./target",
 | 
			
		||||
        "strict": false,
 | 
			
		||||
        "strictNullChecks": true,
 | 
			
		||||
        "module": "commonJS",
 | 
			
		||||
        "target": "ES6",
 | 
			
		||||
    },
 | 
			
		||||
    // "files": [
 | 
			
		||||
    //     "./src/main.ts",
 | 
			
		||||
    // ],
 | 
			
		||||
    "include": [
 | 
			
		||||
        "./src/**/*.ts",
 | 
			
		||||
        "./src/**/*",
 | 
			
		||||
        // "./src/*.ts",
 | 
			
		||||
        // "src/main.ts",
 | 
			
		||||
        // ".eslintrc.js",
 | 
			
		||||
    ],
 | 
			
		||||
    "exclude": [
 | 
			
		||||
        "./target"
 | 
			
		||||
        "./target",
 | 
			
		||||
        "node_modules",
 | 
			
		||||
        "bower_componets",
 | 
			
		||||
        "jspm_packages",
 | 
			
		||||
    ],
 | 
			
		||||
    // "outFile": "./target/mian.js",
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user