5 ms·
Is that option documented somewhere? I imagine there are some tradeoffs with enabling it.
by naasking 9y ago
Is that option documented somewhere? I imagine there are some tradeoffs with enabling it.
- ItsMe000001 9y agohttps://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html https://www.typescriptlang.org/docs/handbook/release-notes/t... > TypeScript 2.6 introduces a new strict checking flag, --strictFunctionTypes. > The --strictFunctionTypes switch is part of the --strict family of switches, meaning that it defaults to on in --strict mode. > Under --strictFunctionTypes function type parameter positions are checked contravariantly instead of bivariantly. > ...(etc.)
- naasking 9y agoContravariance then, right. Thanks! I haven't gotten into Typescript yet, and at this point it looks fairly large and a little daunting, so this is helpful.
- tomerbd 9y agoAnd this project is super interesting: https://1c.wizawu.com/#/whatis https://1c.wizawu.com/#/whatis Use TypeScript on JVM with both NPM and Maven dependencies
- ihsw2 9y agoTradeoffs? It might frustrate some people more accustomed to JS' loose type system.
- coryfklein 9y agoThe major tradeoff, IMO, is that it is even toggle-able at all, let alone being a feature switch that is enabled by default. If you enter any random TS project today, odds are it isn't using that switch, and enabling the switch will lead you down a month long rabbit-hole of fixing cascading type errors.
- bjterry 9y agoNot only that, but since it isn't required many libraries in the ecosystem won't be using it. Comparing my experiences with TypeScript and Flow vs. my experiences with Haskell, any optional type system is going to leave a lot of gaps if you don't have a pretty strict not-invented-here culture.