@ltd/j-ts
TypeScript icon, indicating that this package has built-in type declarations

10.2.0 • Public • Published

@ltd/j-ts

npm install @ltd/j-ts

@ltd/j-ts vs typescript

input.ts

	type T = any;
	
	function * f (v :T) :T {
		return <T> v as T;
	}
	

require('@ltd/j-ts')(input :string, jsx :( (name :string, context :object) => string ) | boolean = false, fileName? :string)

	             
	
	function * f (v   )    {
		return     v     ;
	}
	

(The error thrown for input will have a index :number property.)
(对 input 抛出的错误,会带上 index :number 属性。)

require('typescript').transpileModule(input :string, options :object).outputText

function* f(v) {
    return v;
}

typescript ko @ltd/j-ts

typescript @ltd/j-ts Alt
public / protected / private / readonly constructor parameter ECMAScript class field
enum $ { } / namespace $ { } / module $ { } import * as $ from '';
import $ = require(''); var $ :typeof import('') = require('');
export = $; module.exports = $;
@$ wait ECMAScript decorator proposal

@ltd/j-ts ko typescript

@ltd/j-ts typescript Alt
let v :T = /*#__PURE__*/ f(); let v :T =
/*#__PURE__*/ f();

Readme

Keywords

Package Sidebar

Install

npm i @ltd/j-ts

Weekly Downloads

6

Version

10.2.0

License

LGPL-3.0

Unpacked Size

275 kB

Total Files

5

Last publish

Collaborators

  • ltd