@@ -72,8 +72,8 @@ impl TypeScript {
7272 pub fn print_function ( & self , intf_name : & str , func : & Function ) -> String {
7373 let docs = print_docs ( & func. docs ) ;
7474
75- let ident = func. ident . to_lower_camel_case ( ) ;
76- let name = func. ident . to_snake_case ( ) ;
75+ let ident = func. id . to_lower_camel_case ( ) ;
76+ let name = func. id . to_snake_case ( ) ;
7777
7878 let params = self . print_function_params ( & func. params ) ;
7979
@@ -221,7 +221,7 @@ export async function {ident} ({params}) : {result} {{
221221 . iter ( )
222222 . map ( |field| {
223223 let docs = print_docs ( & field. docs ) ;
224- let ident = field. ident . to_lower_camel_case ( ) ;
224+ let ident = field. id . to_lower_camel_case ( ) ;
225225 let ty = self . print_type ( & field. ty ) ;
226226
227227 format ! ( "{docs}\n {ident}: {ty},\n " )
@@ -237,7 +237,7 @@ export async function {ident} ({params}) : {result} {{
237237 . enumerate ( )
238238 . map ( |( i, field) | {
239239 let docs = print_docs ( & field. docs ) ;
240- let ident = field. ident . to_upper_camel_case ( ) ;
240+ let ident = field. id . to_upper_camel_case ( ) ;
241241 let value: u64 = 2 << i;
242242
243243 format ! ( "{docs}\n {ident} = {value},\n " )
@@ -253,7 +253,7 @@ export async function {ident} ({params}) : {result} {{
253253 . enumerate ( )
254254 . map ( |( i, case) | {
255255 let docs = print_docs ( & case. docs ) ;
256- let case_ident = case. ident . to_upper_camel_case ( ) ;
256+ let case_ident = case. id . to_upper_camel_case ( ) ;
257257 let value = case
258258 . ty
259259 . as_ref ( )
@@ -271,7 +271,7 @@ export async function {ident} ({params}) : {result} {{
271271 . iter ( )
272272 . map ( |case| {
273273 let docs = print_docs ( & case. docs ) ;
274- let case_ident = case. ident . to_upper_camel_case ( ) ;
274+ let case_ident = case. id . to_upper_camel_case ( ) ;
275275
276276 format ! ( "{docs}\n {ident}{case_ident}" )
277277 } )
@@ -286,7 +286,7 @@ export async function {ident} ({params}) : {result} {{
286286 . iter ( )
287287 . map ( |case| {
288288 let docs = print_docs ( & case. docs ) ;
289- let ident = case. ident . to_upper_camel_case ( ) ;
289+ let ident = case. id . to_upper_camel_case ( ) ;
290290
291291 format ! ( "{docs}\n {ident},\n " )
292292 } )
@@ -321,9 +321,10 @@ export async function {ident} ({params}) : {result} {{
321321 . iter ( )
322322 . map ( |func| {
323323 let docs = print_docs ( & func. docs ) ;
324+
324325 let mod_ident = mod_ident. to_snake_case ( ) ;
325326 let resource_ident = ident. to_snake_case ( ) ;
326- let ident = func. ident . to_lower_camel_case ( ) ;
327+ let ident = func. id . to_lower_camel_case ( ) ;
327328
328329 let params = self . print_function_params ( & func. params ) ;
329330 let result = func
0 commit comments