components typescript arguments passing

typescript装饰器(decorator)笔记

介绍: 随着TypeScript和ES6里引入了类,在一些场景下我们需要额外的特性来支持标注或修改类及其成员。 装饰器(Decorators)为我们在类的声明及成员上通过元编程语法添加标注提供了一种方式。 Javascript里的装饰器目前处在建议征集的第三阶段,但在TypeScript里已做为一项 ......
typescript decorator 笔记

centos8安装docker 遇到yum install -y yum-utils报错,No match for argument:Unable to find a match:

centos8部署docker 执行yum install -y yum-utils报错,No match for argument,Unable to find a match 这是两个问题,我们先解决第一个问题: 第一个问题是服务器的语言环境有问题,可以通过下面命令进行设置解决: echo "e ......
match yum yum-utils argument centos8

Vscode提示"Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5...."

完整错误如下。点击错误信息会定位到tsconfig.json和tsconfig.node.json两个文件。 Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Spec ......

关于typescript引入第三方js文件

一、通过 require 方法 1.1. 安装 @types/node 并在 tsconfig.json 配置,如下图所示。 npm i @types/node 1.2. 在ts或vue中引入 const vc: any = require('@/libs/VCtrl.js') 二、通过 decla ......
第三方 typescript 文件

TypeScript学习笔记-尚硅谷TypeScript教程(李立超老师TS新课)

TypeScript学习笔记-尚硅谷TypeScript教程(李立超老师TS新课)https://blog.csdn.net/m0_46549017/article/details/124626987?ops_request_misc=&request_id=&biz_id=&utm_medium= ......
TypeScript 老师 笔记 教程

[State Estimation] 2.2.8 Passing a Gaussian throught a Nonlinearity

将高斯 PDF 通过非线性函数,结果使用高斯变换表示。 这涉及到 linearization 。 问题的定义是有 $\mathbf{x}$ 符合高斯噪声(即已知 $p(\mathbf{x})$),有变换 $g(\cdot): \mathbf{x} \to \mathbf{y}$(即已知 $p(\ma ......

Programming: Variable Arguments (Varargs)

Java arr本质是一个数组,可直接传数组,引用类型,可能为null JavaScript Function length rest parameter Go ......
Programming Arguments Variable Varargs

[Typescript] Write clean Type 3 - make a wrapper to cleanup generic usages

Original code: import { CSSProperties } from "react"; const useStyled = <TTheme = {}>(func: (theme: TTheme) => CSSProperties) => { // Imagine that thi ......
Typescript cleanup generic wrapper usages

Solon2 常用注解之 @Component 与 @ProxyComponent 的区别

在 Solon 提倡“克制”的原则下,托管组件分为: 普通组件: 主要由内核提供的:@Configuration、@Component、@Controller、@Remoting 注解的类 其中 @Controller、@Remoting 支持函数拦截 代理组件: 主要由内核提供的:@ProxyCo ......

TypeScript:交叉类型

交叉类型 又是TS的一个骚操作。他可以把多个类或接口,合并他们的所有属性和方法为一个新的类型: interface PersonA{ name: string; } interface PersonB{ age: number; sayHi(): void; } type Person = Pers ......
TypeScript 类型

TypeScript keyof 和 typeof

typeof typeof 是 JS 本身就有的一个操作符,只不过在 TS 中多了一个功能。typeof 在 JS 中是获取变量的类型字符串: console.log(typeof 42); // "number" console.log(typeof 'blubber'); // "string" ......
TypeScript typeof keyof

TypeScript extends

extends 的含义 extends 在接口和类中都是继承的意思,继承之后的子接口或子类都是属于这个父接口或父类的,是一个从属关系。 extends 还有一个重要的用法就是在类型中,依旧还是继承的意思,是一种从属关系。如下的例子所示: interface Animal { name: string ......
TypeScript extends

【shell】win10的wsl子系统,删除文件报错-bash: /usr/bin/rm: Argument list too long

1、场景 由于测试需要删除缓存目录相关文件,但是rm -rf ./*的时候报错 2、处理方法 cd [需要删除的目录] ls | xargs -n 10 rm -fr ls 参数解释: 输出所有的文件名(用空格分割) xargs就是将ls的输出,每10个为一组(以空格为分隔符),作为rm -rf的参 ......
子系统 Argument 文件 shell bash

【批处理】powershell RMDIR删除文件夹及文件报错,Remove-Item: A positional parameter cannot be found that accepts argument 'xxxxx'.

1、场景 由于测试导致的缓存文件较多,需要删除,手动删除太慢,所以直接用命令删除 2、报错 备注:没装powershell的电脑可以用的 3、处理方法 cmd --% /c RMDIR /Q/S C:\Users\ADMINI~1\AppData\Local\Temp 参数解释: --%,停止解析符 ......

nginx中的proxy_pass配置

Nginx 是最常用的反向代理工具之一,一个指令 proxy_pass搞定反向代理,对于接口代理、负载均衡很是实用,但 proxy_pass指令后面的参数很有讲究,通常一个/都可能引发一个血案。 通常nginx配置proxy_pass指令时,如果proxy_pass后面的url加/,表示绝对根路径; ......
proxy_pass nginx proxy pass

TypeScript type 关键字和 interface 关键字

前言 type 和 interface 都可以声明 TS 类型。 type Point1 = { x: number; y: number; }; interface Point2 { x: number; y: number; }; 它们两个声明这个对象类型有任何区别吗?很明显没有,我认为最能区分 ......
关键字 关键 TypeScript interface type

D. Connected Components

D. Connected Components https://www.codeforces.com/contest/292/problem/D 思路 由于需要删除任意 连续段的 连接线, 引入前缀和 连续段的左右两边都需要, 所以引入两个前缀和。 https://blog.csdn.net/qq_ ......
Components Connected

TypeScript 报错:Type '({ filename: string; createTime: string; filePath: string; fileId: number; } | undefined)[]' is not assignable to type 'PiFile[]'.

问题: 因为TypeScript不支持直接给一个接口类型的变量 赋一个未知的值。 如 const a:A = { name:'s' }; 你需要给这样的对象或数组值使用as 指定一个类型。 正确写法: const a:A = { name:'s' } as A; 数组写法一样: const a:A[ ......
string 39 TypeScript createTime assignable

typescript vue3 VueDraggable 报错 Uncaught TypeError: Cannot read properties of null (reading 'element')

Uncaught TypeError: Cannot read properties of null (reading 'element') nnot read properties of null (reading 'index') 错误写法 就是说子组件需要用div包着,你用其他东西,他无法添加 ......

Angular 复习与进阶系列 – Component 组件 の Lifecycle Hooks

前言 我们在 这篇 和 这篇 中已经学习了几个基本的 Lifecycle Hooks. 分别是 constructor OnInit AfterContentInit AfterViewInit OnDestroy OnChanges 这篇我们会把其余的 Lifecycle Hooks 都学完. I ......
组件 Component Lifecycle Angular Hooks

TypeScript:高级类型

class类型 class类型,和Java差不多。 class Person { name: string; age: number = 0; } let person = new Person(); 构造函数 class Person { name: string; age: number = 0 ......
TypeScript 类型

TypeScript:函数兼容性问题

函数兼容性 大家在JS中经常可以看到这样的代码: lisr.forEach( (item) => {}); lisr.forEach( (item,index) => {}); 就是()的参数有时是可以省略的,而这个正式函数的兼容性性质。说白了就是: 多的函数 = 少的函数;参数少的函数可以赋值给参 ......
兼容性 TypeScript 函数 问题

TypeScript:常用类型约束

JS已有的数据类型如number、string、null....但并没有进行类型限制 所以,TS在支持JS全部类型的类型注解基础上,自己还加了一些新类型和新类型注解。 JS已有类型 基础类型:number , string ,boolean , null, undefined, symbol 对象类 ......
TypeScript 常用 类型

TypeScript:字面量类型

我是做Java的,看到这个字面量类型震惊我三观,原来设计类型可以这么草率。 先说吧,字符串、数字、对象、布尔类型的常量值,可以作为字面量类型。是的,是常量值作为类型。举个下面例子: const name:'zhangsan' = 'zhangsan' const age:18 = 18 const ......
字面 TypeScript 类型

TypeScript:类型断言

TS中有类型推断的机制,就是你不指定常量类型,TS会自动帮你推动,如下: 但他这种推断机制,是基于高层的父元素,很多子元素的方法和属性使用用不到,这样我们得手动的进行类型断言,使用 [as 元素类型],如下: 如果你不知道此标签的元素类型,可以通过下面的方式: 找到自己知道类型的标签类型,指着这个标 ......
TypeScript 类型

Angular 复习与进阶系列 – Component 组件 の Dependency Injection & Query Elements

前言 在 Angular 复习与进阶系列 – Dependency Injection 依赖注入 的结尾, 我们提到了如何在项目中, 组件中使用 DI. 但那些只是一小部分而已. Angular DI 在组件内的用途非常广, 而且挺复杂的. 这篇我们将详细的去理解它. ......

TypeScript:可选参数

TS中定义的函数参数,默认都是必传的,不然编译不过。如果想指定参数是可选,在参数后加?即可,如下: function add(num1?: number,num2?: number): void{ } 注意:可选参数后面是不能有必填参数的,举个反例: function add(num1?: numb ......
TypeScript 参数

docker_day02:lass-Pass和Saas docker启动设置镜像 镜像 容器相关命令

什么是Iaas-Paas和Saas Iaas:Infrastructure-as-a-Service(基础设施即服务) IaaS公司会提供场外服务器,存储和网络硬件,你可以租用。节省了维护成本和办公场地,公司可以在任何时候利用这些硬件来运行其应用 Paas:平台即服务 paaS公司在网上提供各种开发 ......
镜像 docker 容器 docker_day lass-Pass

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".

完整报错信息: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install ......
quot component MSBUILD VCBuild Visual

docker,laas-pass和saas,docker启动设置镜像,镜像相关命令,容器相关命令

内容回顾 flask-sqlalchemy flask中集成sqlalchemy session要并发安全 建立表模型集成Base 字段,字段参数,统统需要导入 flask-sqlalchemy:封装了一个类,只需要实例化得到对象 配置信息:直接放到配置文件》flask-sqlalchemy如何读出 ......
镜像 命令 docker 容器 laas-pass