tsc

TSC 条码打印机 Dll 说明

ⅰ亾dé卋堺 提交于 2020-02-09 08:21:52
请于使用TSCLIB.DLL前,安装条形码打印机驱动程序。 1. openp*t(a) 说明: 指定计算机端的输出端口 参数: a: 单机打印时,请指定打印机驱动程序名称,例如: TSC CLEVER TTP-243 若连接打印机服务器,请指定服务器路径及共享打印机名称,例如: \\SERVER\TTP243 2. closep*t() 说明: 关闭指定的计算机端输出端口 参数: 无 3. setup(a,b,c,d,e,f,g) 说明: 设定卷标的宽度、高度、打印速度、打印浓度、感应器类别、gap/black mark 垂直间距、gap/black mark 偏移距离) 参数: a: 字符串型别,设定卷标宽度,单位 mm b: 字符串型别,设定卷标高度,单位 mm c: 字符串型别,设定打印速度,(打印速度随机型不同而有不同的选项) 1.0: 每秒1.0吋打印速度 1.5: 每秒1.5吋打印速度 2.0: 每秒2.0吋打印速度 3.0: 每秒3.0吋打印速度 4.0: 每秒4.0吋打印速度 5.0: 每秒5.0吋打印速度 6.0: 每秒6.0吋打印速度 d: 字符串型别,设定打印浓度, 0~15,数字愈大打印结果愈黑 e: 字符串型别,设定使用感应器类别 0 表示使用垂直间距传感器(gap sens*) 1 表示使用黑标传感器(black mark sens*) f: 字符串型别

VSCode中自动编译typescript

风格不统一 提交于 2020-02-08 03:41:24
一、安装typescript: cnpm i typescript -g 二、创建相应的项目目录,当前项目目录; 三、创建tsconfig.json文件: tsc --init 四、打开tsconfig.json文件修改和删除相应配置(如果想快速修改配置,请复制下列配置): { "compilerOptions": { "target": "es5", "noImplicitAny": false, "module": "amd", "removeComments": false, "sourceMap": false, "outDir": "src/js"//你要生成js的目录 } } 五、新建ts为扩展名的ts文件(test.ts); 六、点击菜单 “Terminal-Run task”,点击 “tsc:watch-tsconfig.json”,自行编辑ts文件的时候,就会自动生成js代码。 来源: CSDN 作者: duansamve 链接: https://blog.csdn.net/duansamve/article/details/104212714

用VsCode编辑TypeScript

蓝咒 提交于 2020-01-28 06:43:36
原文地址: https://code.visualstudio.com/Docs/languages/typescript TypeScript是Javascript的超集,它提供了类、模块、接口来帮助你构建强大的组件。 这里 可以找到语言规范。 VS Code下TypeScript支持在两种不同的模式下运行: 文件范围: 在这个模式下,VsCode打开的TypeScript文件被视为独立单元。只要A.ts没有明确引用b.ts(使用///引用目录或额外模块),那么两个文件就没有通用项目上下文。 显式项目: 一个typescript项目通过一个tsconfig.json被定义。该文件指定ts项目根目录,列出了属于项目的文件还有编译选项。 更多有关tsconfig.json细节 。 小提示: 我们建议你使用显式项目模式范围代替文件范围模式。由于显式项目模式列出了属于一个项目语言的所有文件,因此,像查找所有引用Shift+F12仅考虑项目范围不是文件范围。 tsconfig.json 通常,任何一个新项目的第一步是添加一个tsconfig.json文件。它定义了ts项目设置例如编译选项和包括的文件。 想要做到这点,打开你想存储资源的文件夹中添加一个叫tsconfig.json的文件。然后智能感知就会生效。 一个tsconfig.json例子,表明是es5、commonJs模块

npm installing old versions of (typescript compiler) package

半腔热情 提交于 2020-01-15 03:54:09
问题 On a windows environment, I have: node v4.6.0 npm v3.10.8 my local typescript version is: npm run tsc -v 3.10.8 However, I sometimes want to use my global tsc (because for some reason, gulp uses the global tsc) but when I do: npm install tsc -g tsc -v I get a version 1.5.3 for my typescript compiler when I try to force install it to the exact version I need: npm install tsc@3.10.8 -g I get: ` npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\DT\AppData

Angular: ngc or tsc?

旧巷老猫 提交于 2020-01-15 03:11:19
问题 I have been using tsc, but see that angular.io emphasizes ngc. I am wondering if there are advantages to either or if I should choose one over the other. Thanks in advance. 回答1: tsc and ngc have different purposes and it's not about selecting one over the other. tsc is a TypeScript compiler, and you need it to generate JavaScript if your app is written in TypeScript. ngc is an Angular-specific compiler. It doesn't turn the TypeScript code into JavaScript. It does a "finishing touch" to make

Convert array of strings to TypeScript type

此生再无相见时 提交于 2020-01-14 05:43:10
问题 Say I have an array of strings: const s = ['foo', 'rolo', 'zoombaz']; and so I would get: type v = { foo: string, rolo: string, zoombaz: string } bonus: Ideally I am looking to map them to camel-case, so if I had: const s = ['foo', 'rolo', 'zoom-baz']; I would get: type v = { foo: string, rolo: string, zoomBaz: string } in some cases, I would want to tell it to use boolean instead of string. This is for a command line parser. 回答1: First you'll need to get TypeScript to infer the element type

TypeScript基本语法---02tsc命令、语法规则

喜你入骨 提交于 2020-01-11 02:05:10
一、tsc命令 //tsc 命令编译 tsc hello.ts //可以同时编译多个ts文件 tsc fileName1.ts fileName2.ts fileName3.ts //在监视模式下运行编译器。会监视输出文件,在它们改变时重新编译. tsc fileName.ts --watch 二、语法规则 TypeScript 区分大小写 TypeScript 区分大写和小写字符。 分号是可选的 每行指令都是一段语句,你可以使用分号或不使用, 分号在 TypeScript 中是可选的,建议使用。 TypeScript 注释 注释是一个良好的习惯,虽然很多程序员讨厌注释,但还是建议你在每段代码写上文字说明。 注释可以提高程序的可读性。 注释可以包含有关程序一些信息,如代码的作者,有关函数的说明等。 编译器会忽略注释 。 TypeScript 支持两种类型的注释 单行注释 ( // ) − 在 // 后面的文字都是注释内容。 多行注释 (/* */) − 这种注释可以跨越多行。 TypeScript 与面向对象 面向对象是一种对现实世界理解和抽象的方法,简单。 TypeScript 是一种面向对象的编程语言。 面向对象主要有两个概念:对象和类。 对象 :对象是类的一个实例( 对象不是找个女朋友 ),有状态和行为。例如,一条狗是一个对象,它的状态有:颜色、名字、品种;行为有:摇尾巴、叫

软件功能安全概念 TSC

余生长醉 提交于 2020-01-10 10:42:15
首先,需要提出safty goal ,并得出与之匹配的FTTI 其次,为了保证达到制定的safty goal ,衍生出的保证功能实现是正确的软件需求 1.通信 com 三种机制:收E2E,发E2E,Timeout检查机制 2.标定 calibration 需要具备calibration自检的能力 3.存储 读和写的权限,读和写的准确性 再次,为了保证系统的稳定性,需要衍生出的软件需求 1.初始化 Init Check 2.Watchdog 3.Power Monitoring 4.Clock Monitoring 5.Memory Protection 6.IO Configuration 7.ADCSelftest 8.system level communication 最好,确定fault table,是tempro还是latency,用于决定是否reset 硬件fault and PMC fault ,系统切换至safety status2 ,是更为严重的错误状态 其余fault, 系统切换至safety status1,可以再normal statue and safety status之间切换 来源: CSDN 作者: 耶yeah 链接: https://blog.csdn.net/weixin_42123438/article/details/103866767

Cannot compile typescript using tsc node module

半世苍凉 提交于 2020-01-04 04:15:12
问题 I'm trying to compile a typescript into JavaScript using tsc node package module. First of all, I've installed the module using npm install -g typescript . In my local directory I've created a file called classes.js containing a valid typescript code. When running tsc classes.js I get the following error: Error reading file "./classes.js": File not found The error doesn't make much sense, since the file exist. Same error is shown when the absolute file path is used. I'm wondering if there is

How to transpile a Relay query from TypeScript to ES5?

自闭症网瘾萝莉.ら 提交于 2020-01-04 02:19:08
问题 I'm writing a web app in TypeScript. The app uses React and Relay from Facebook. My TypeScript source code gets compiled into ES6 code using the TypeScript compiler TSC. Then, the ES6 code gets transpiled into ES5 code using Babel. In order for Relay to work in the browser, a Babel plugin needs to transform the Relay GraphQL queries: https://facebook.github.io/relay/docs/guides-babel-plugin.html. The problem is, because TSC first transpiles these queries, the Babel Relay plugin doesn't