Add skip_typescript attribute to prevent .d.ts emit (#2016)

* Add skip_typescript attribute to prevent .d.ts emit

* Add guide page for typescript attribute
This commit is contained in:
Joey Watts
2020-03-03 10:34:28 -05:00
committed by GitHub
parent 3f4acc453b
commit 7ffb5ed70c
12 changed files with 227 additions and 56 deletions

View File

@ -100,6 +100,7 @@ macro_rules! shared_api {
name: &'a str,
variants: Vec<EnumVariant<'a>>,
comments: Vec<&'a str>,
generate_typescript: bool,
}
struct EnumVariant<'a> {
@ -110,6 +111,7 @@ macro_rules! shared_api {
struct Function<'a> {
arg_names: Vec<String>,
name: &'a str,
generate_typescript: bool,
}
struct Struct<'a> {
@ -117,12 +119,14 @@ macro_rules! shared_api {
fields: Vec<StructField<'a>>,
comments: Vec<&'a str>,
is_inspectable: bool,
generate_typescript: bool,
}
struct StructField<'a> {
name: &'a str,
readonly: bool,
comments: Vec<&'a str>,
generate_typescript: bool,
}
struct LocalModule<'a> {