Friday, December 02, 2022

TypeScript partial interface: optional | required

 Make the TypeScript interface partially optional/required | pawelgrzybek.com

interface Dude {
  name: string;
  age: number;
}

type DudeAllOptional = Partial<Dude>;

// name and age are optional
const dan: DudeAllOptional = {};
interface Dude {
  name: string;
  age?: number;
}

type DudeAllRequired = Required<Dude>; // all required

etc...


reactstrap = React + "Bootstrap"

JavaScript is getting almost as complex as biological systems, all kinds of strange combinations...

GitHub - reactstrap/reactstrap: Simple React Bootstrap 5 components @GitHub

Stateless React Components for Bootstrap 5.

This library contains React Bootstrap components that favor composition and control. The library does not depend on jQuery or Bootstrap javascript. However, Poppers.js via react-popper is relied upon for advanced positioning of content like Tooltips, Popovers, and auto-flipping Dropdowns.