aleph.js icon indicating copy to clipboard operation
aleph.js copied to clipboard

support import_maps in @deno-types

Open codehz opened this issue 4 years ago • 3 comments
trafficstars

testing code:

// @deno-types="~/typings/fake.d.ts"
import Fake from "fake";

import maps:

{
  "imports": {
    "~/": "./",
    "fake": "<some valid js file url>.js"
    // skip
  },
  "scopes": {}
}

typings/fake.d.ts in root folder

export default const fake: number;

Result: no error found in vscode and deno extenison failed message output invalid prefix ~/

it seems swc won't transform the @deno-types in comments... Idea: purge all comments thats contains @deno-types, it is useless in js file

codehz avatar Jul 12 '21 07:07 codehz

swc doesn't check the types, includes @deno-types. where you got the error message? aleph dev?

ije avatar Jul 16 '21 19:07 ije

swc doesn't check the types, includes @deno-types. where you got the error message? aleph dev?

ssr mode, since deno check deno-type even in js file...

codehz avatar Jul 16 '21 23:07 codehz

i see, will fix this, thanks

ije avatar Jul 17 '21 04:07 ije