From 9cca185c920b11098caf8debc1c5da0f0b175998 Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Thu, 5 Sep 2024 17:55:44 +0100 Subject: [PATCH] Add `moduleResolution` `bundler` to FAQ answer (#337) --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 33385bf..4962690 100644 --- a/FAQ.md +++ b/FAQ.md @@ -737,7 +737,7 @@ Here are some behaviors that may look like bugs, but aren't. * A method and a function property of the same type behave differently. * Methods are always bivariant in their argument, while function properties are contravariant in their argument under `strictFunctionTypes`. More discussion [here](https://github.com/microsoft/TypeScript/pull/18654). * Export maps aren't respected. - * TypeScript's support for export maps is recent, and requires `moduleResolution` be set to `node16` or `nodenext` to be respected. + * TypeScript's support for export maps is recent, and requires `moduleResolution` be set to `node16`, `nodenext` or `bundler` to be respected. * A default import of a commonjs module with a default in a esm file doesn't seem to be the default export of that module when `module` is `node16` or `nodenext`. * TypeScript is exposing `node`'s behavior here - when a esm module default imports a commonjs module, that whole commonjs module is made available as the default import. If you then want the actual default member of that module, you'll need to access the `default` member of that import. Refer to the [node documentation](https://nodejs.org/api/esm.html#commonjs-namespaces) for more information.