I have a non ts code like this:
// foo.js
module.exports = app => {
// some logic here
}
I want to use typescript definition files to define the type of the argument app, so that VSCode will give me the intelisense
// foo.d.ts
interface App {
name: string
bar: number
}
then I do jsdocs in my js file:
// foo.js - updated
/// <reference path="./foo.d.ts" />
/**
* @param {App} app
*/
module.exports = (app) => {
}
when I write app. it shows me the available properties.
But if I change my definition file so that it has dependencies:
import * as React from "react"
export interface App {
name: string
count: number
}
intelisense stops working.
What am I doing wrong?