Absolute pathing does not return variable's definition

Viewed 169

When I try to import a function using an absolute path i.e.

const test = require("@/functions")

the function's parameters and definitions aren't defined, only returning :any.

However, if I do the same import with relative pathing i.e.

require("../../functions")

it defines it correctly.

I even have a jsconfig.json defined:

{
    "compilerOptions": {
        "baseUrl": ".",
        "paths": {
            "@/*": [
                "./src/*"
            ],
            "#/*": [
                "./*"
            ]
        }
    },
}

What I expect to see:

enter image description here

What I actually get:

enter image description here

0 Answers
Related