Merge pull request #156 from jsheard/jsheard-patch-1

Fix Typescript definition of constructor arguments
This commit is contained in:
Alex Crichton 2018-04-23 09:15:47 -05:00 committed by GitHub
commit da2057610f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -371,7 +371,7 @@ impl<'a> Context<'a> {
", name));
if let Some(ref constructor) = class.constructor {
ts_dst.push_str(&format!("constructor(...args: [any]);\n"));
ts_dst.push_str(&format!("constructor(...args: any[]);\n"));
dst.push_str(&format!("
// This invocation of new will call this constructor with a ConstructorToken