Skip to content

Commit

Permalink
refactor: add explicit return type
Browse files Browse the repository at this point in the history
Otherwise we have a nasty ` The inferred type of 'getTsMorphProject' cannot be named without a reference to ....`
  • Loading branch information
Julien-R44 committed Feb 17, 2024
1 parent 69f7c0c commit 50aef38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/ace/codemods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ export class Codemods extends EventEmitter {
* Returns the TsMorph project instance
* See https://ts-morph.com/
*/
async getTsMorphProject() {
async getTsMorphProject(): Promise<
| InstanceType<typeof import('@adonisjs/assembler/code_transformer').CodeTransformer>['project']

Check failure on line 123 in modules/ace/codemods.ts

View workflow job for this annotation

GitHub Actions / typecheck / typecheck

Property 'project' does not exist on type 'CodeTransformer'.

Check failure on line 123 in modules/ace/codemods.ts

View workflow job for this annotation

GitHub Actions / typecheck / typecheck

Property 'project' does not exist on type 'CodeTransformer'.
| undefined
> {
const transformer = await this.#getCodeTransformer()
if (!transformer) {
this.#cliLogger.warning(
Expand Down

0 comments on commit 50aef38

Please sign in to comment.