Typescript allows you to essentially write a typed API interface for your library (instead of rewriting your entire library in typescript), but support is fairly spotty.
The (disputed) John Steinbeck quote you might be referring to: "Socialism never took root in America because the poor see themselves not as an exploited proletariat, but as temporarily embarrassed millionaires"