Skip to content

Commit

Permalink
test: correct generated-fns fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Feb 26, 2024
1 parent e8d11e1 commit b7c438d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions test/fixtures/pre/generated-fns.expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@ class CommandInterceptor {
*
* @param {string} lifeCycle
*
* @return {(this: CommandInterceptor, ...args: any[]) => any} interceptor method
* @return {(name: string) => any} interceptor method
*/
function createHook(lifeCycle) {
return () => {

/**
* @this {CommandInterceptor}
*
* @param {string} name
*
* @returns {any}
*/
const hookFn = () => {
return null;
};

return hookFn;
}
14 changes: 12 additions & 2 deletions test/fixtures/pre/generated-fns.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ CommandInterceptor.prototype.canExecute = createHook('canExecute');
*
* @param {string} lifeCycle
*
* @return {(this: CommandInterceptor, ...args: any[]) => any} interceptor method
* @return {(name: string) => any} interceptor method
*/
function createHook(lifeCycle) {
return () => {

/**
* @this {CommandInterceptor}
*
* @param {string} name
*
* @returns {any}
*/
const hookFn = () => {
return null;
};

return hookFn;
}

0 comments on commit b7c438d

Please sign in to comment.