@@ -118,7 +118,7 @@ export module DotNet {
118118 * @param args Arguments to pass to the method, each of which must be JSON-serializable.
119119 * @returns The result of the operation.
120120 */
121- export function invokeMethod < T > ( assemblyName : string , methodIdentifier : string , ...args : any [ ] ) : T {
121+ export function invokeMethod < T > ( assemblyName : string , methodIdentifier : string , ...args : any [ ] ) : T | null {
122122 const dispatcher = getDefaultCallDispatcher ( ) ;
123123 return dispatcher . invokeDotNetStaticMethod < T > ( assemblyName , methodIdentifier , ...args ) ;
124124 }
@@ -342,7 +342,7 @@ export module DotNet {
342342 * @param args Arguments to pass to the method, each of which must be JSON-serializable.
343343 * @returns The result of the operation.
344344 */
345- invokeDotNetStaticMethod < T > ( assemblyName : string , methodIdentifier : string , ...args : any [ ] ) : T ;
345+ invokeDotNetStaticMethod < T > ( assemblyName : string , methodIdentifier : string , ...args : any [ ] ) : | null ;
346346
347347 /**
348348 * Invokes the specified .NET public static method asynchronously.
@@ -436,7 +436,7 @@ export module DotNet {
436436 this . completePendingCall ( parseInt ( asyncCallId , 10 ) , success , resultOrError ) ;
437437 }
438438
439- invokeDotNetStaticMethod < T > ( assemblyName : string , methodIdentifier : string , ...args : any [ ] ) : T {
439+ invokeDotNetStaticMethod < T > ( assemblyName : string , methodIdentifier : string , ...args : any [ ] ) : T | null {
440440 return this . invokeDotNetMethod < T > ( assemblyName , methodIdentifier , null , args ) ;
441441 }
442442
@@ -564,7 +564,7 @@ export module DotNet {
564564 constructor ( private readonly _id : number , private readonly _callDispatcher : CallDispatcher ) {
565565 }
566566
567- public invokeMethod < T > ( methodIdentifier : string , ...args : any [ ] ) : T {
567+ public invokeMethod < T > ( methodIdentifier : string , ...args : any [ ] ) : T | null {
568568 return this . _callDispatcher . invokeDotNetMethod < T > ( null , methodIdentifier , this . _id , args ) ;
569569 }
570570
0 commit comments