our current application (after 1.5 years)
developers
lines of React/Redux
Jest tests
k
k
function square(n) {
return n * n;
}
square("oops");
function square(n) {
return n * n;
}
square("oops");
// ¯\_(ツ)_/¯
// Use noImplicityAny
function square(n) {
return n * n;
}
square("oops");
Error (x2)
string. The operand of an arithmetic operation must be a number.
^
^
function square(n) {
return n * n;
}
square({});
// ¯\_(ツ)_/¯
| FlowType | TypeScript | |
|---|---|---|
| StackOverflow | ~900 | ~38,000 |
| GitHub Issues | 1,500 open 2,200 closed |
2,400 open 11,200 closed |
| npm downlaods per month |
2.9 million | 7.2 million |
| external type definitions |
export interface ILozengeProps extends ILozengeFontProps {
/**
* [optional] Color to override default color of black
*/
lozengeBackgroundColor?: lozengeColor;
/**
* [optional] Type of lozenge with regard to border radius
* Default is the pill style lozenge with rounded corners
* Circle will make border radius 50% to create a circle
*/
lozengeType?: 'pill' | 'circle';
/**
* [optional] Add border the same color as font to lozenge.
* Default is white, same as default font
*/
border?: boolean;
/**
* [optional] height and width to add to lozenge
*/
dimensions?: { height: string; width: string };
}
const StyledBase = styled.div<IProps>`
color: ${props => props.coolTextColor};
`;module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
}
],
},
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: [".ts", ".tsx", ".js"]
},