tc39 / proposal-import-attributes

Proposal for syntax to import ES modules with assertions
https://tc39.es/proposal-import-attributes/
Apache License 2.0
591 stars 26 forks source link

Should we allow more than just strings as module attributes? #59

Open littledan opened 4 years ago

littledan commented 4 years ago

We've talked about generalizing to static-looking object literals in general. A more scoped generalization, proposed by @Jack-Works , would be just allowing Numbers, BigInts, null, booleans, and (maybe?) undefined.

I want to propose that we could go to Stage 2 with just strings, and consider generalizations between Stage 2 and 3. In particular, I believe the generalizations @Jack-Works proposes would not be core to the data model or other fundamental decisions that we need to assess for the viability of the proposal overall.

xtuc commented 4 years ago

I agree with it being a stage 3 concern. One thing I would like to avoid is promoting hacks to pass other types by parsing the strings like "null", "false", ... in the proposal or make people thing that's something we planned.