1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// #![allow(incomplete_features)]
// #![feature(specialization)]
/**
ts_string is a utility macro for emitting typescript strings from rust code
usage:
let ts: String = ts_string!{
const x = 7;
};
assert_eq!(ts, "const x = 7;".to_string());
**/
/**
ts_quote is a utility macro for emitting typescript from rust code
ts_quote returns a Result<deno_ast::ParsedSource, deno_ast::Diagnostic>
This is aliased to the ts_quote::TS type
usage:
let ts: TS = ts_quote!{
const x = 7;
}?;
assert_eq!(ts.formatted(None), "const x = 7;".to_string());
**/