File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ describe('Neovim API', () => {
86
86
87
87
it ( 'can run lua' , async ( ) => {
88
88
expect (
89
- await nvim . lua ( 'function test(a) return a end return test(...)' , 1 )
89
+ await nvim . lua ( 'function test(a) return a end return test(...)' , [ 1 ] )
90
90
) . toBe ( 1 ) ;
91
91
92
92
expect (
Original file line number Diff line number Diff line change @@ -448,17 +448,17 @@ export class Neovim extends BaseApi {
448
448
}
449
449
450
450
/**
451
- * Executes lua, it's possible neovim client does not support this
451
+ * Executes Lua code.
452
452
*/
453
- lua ( code : string , args : VimValue [ ] = [ ] ) : Promise < object > {
453
+ lua ( code : string , args : VimValue [ ] = [ ] ) : Promise < VimValue > {
454
454
const _args = Array . isArray ( args ) ? args : [ args ] ;
455
455
return this . request ( `${ this . prefix } execute_lua` , [ code , _args ] ) ;
456
456
}
457
457
458
458
/**
459
459
* Alias for `lua()` to be consistent with neovim API
460
460
*/
461
- executeLua ( code : string , args : VimValue [ ] = [ ] ) : Promise < object > {
461
+ executeLua ( code : string , args : VimValue [ ] = [ ] ) : ReturnType < typeof this . lua > {
462
462
return this . lua ( code , args ) ;
463
463
}
464
464
You can’t perform that action at this time.
0 commit comments