lab/overwriteReadonlyProp.ts:34:63 Implicit conversion of a 'symbol' to a 'string' will fail at runtime
Closed this issue · 10 comments
I am a deno user and recently switched to deno's new vendoring feature.
This means I am no longer using the cached (transpiled .js) version, but rather the .ts source code.
Deno gives me the following error (tsafe@1.0.0):
TS2731 [ERROR]: Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.
throw new Error(`Probably a wrong ides to overwrite ${propertyName} getter`);
~~~~~~~~~~~~
at .../raw.githubusercontent.com/garronej/tsafe/v1.0.0/deno_dist/lab/overwriteReadonlyProp.ts:34:63
I experienced this when trying to import * as evt from "https://deno.land/x/evt@v2.3.2/mod.ts";
Thank you very much for reporting!
@andreas-wagner It should now work with:
import * as evt from "https://deno.land/x/evt@v2.3.3/mod.ts";
Do you confirm?
And btw how to you enable deno's new vendoring feature?
Yes it's gone, Thank you!
Please check the other 2 bugs on minimal_polyfills@2.2.1 as well.
Deno provides vendoring via deno vendor [FILE]
.
In my case:
# remove the import-map from the configuration file
deno eval 'import j from \"./deno.json\" assert { type: \"json\" }; delete j.importMap; Deno.writeTextFile(\"./deno.json\", JSON.stringify(j, null, 2));'
# clear the vendored modules, so we don't pile up old ones
rm -rf .deno_vendor
# vendor all denpendencies of deps.ts into .deno_vendor
deno vendor --force --output=.deno_vendor deps.ts
Please check the other 2 bugs on minimal_polyfills@2.2.1 as well.
Of course but I can't reproduce.
I have:
import * as evt from "https://deno.land/x/evt@v2.3.3/mod.ts";
console.log(evt);
and then I do:
deno vendor --force --output=.deno_vendor test.ts
deno run --no-remote --import-map=.deno_vendor/import_map.json test.ts
But I have no error:
Ah sorry, I forgot to add the steps, so you can reproduce.
Added them to the actual issue (applies for the other one as well) over here:
garronej/minimal_polyfills#7 (comment)
Hi @andreas-wagner,
Thank you,
This time everything should work with
import * as evt from "https://deno.land/x/evt@v2.3.4/mod.ts";
Hey, I saw the relase on github, but it's not yet available on deno.land (v2.3.3 is still the latest there)
@andreas-wagner, there must be some delay on their end. It's up now.
Ah cool evt@v2.4.0 fixes this one (can be closed):
garronej/minimal_polyfills#6
But it does not fix the one you closed:
garronej/minimal_polyfills#7
I still get this:
error: TS2564 [ERROR]: Property '[Symbol.toStringTag]' has no initializer and is not definitely assigned in the constructor.
[Symbol.toStringTag]: string;
~~~~~~~~~~~~~~~~~~~~
at file:///.../.deno_vendor/raw.githubusercontent.com/garronej/minimal_polyfills/v2.2.1/deno_dist/Map.ts:14:5
Looking in my .deno_vendor folder, it seems that now both minimal-polyfills@v2.2.1 and minimal-polyfills@v2.2.2 are used.
Maybe there is another dependency in Evt that is using the "old" minimal-polyfills?