Explain solid principles using JavaScript and TypeScript