- Книга Tackling TypeScript: Upgrading from JavaScript
- Книга Профессиональный TypeScript. Разработка масштабируемых JavaScript-приложений
- Refactoring.Guru - всё про рефакторинг: что такое рефакторинг, как понять, что настало время проводить рефакторинг, как его проводить, паттерны проектирования с примерами на многих языках, включая TypeScript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected componentWillMount(): void { | |
document.addEventListener('click', this.toggle); | |
} | |
protected componentWillUnmount(): void { | |
document.removeEventListener('click', this.toggle); | |
} | |
private toggle = (event): void => { | |
event.preventDefault(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deg2rad (angle) { | |
return angle * .017453292519943295; | |
} | |
function distance($lat1,$lng1,$lat2,$lng2) | |
{ | |
$lat1=deg2rad($lat1); | |
$lng1=deg2rad($lng1); | |
$lat2=deg2rad($lat2); | |
$lng2=deg2rad($lng2); |
💌 Пожалуйста, оставьте отзыв о вебинаре!
- Рекомендации по наименованию генериков - Tidy TypeScript: Name your generics
- Объяснение генериков - TypeScript Generics for People Who Gave Up on Understanding Generics
- My post TypeScript: Sorting out tsconfig. Part 1
- My post TypeScript: Sorting out tsconfig. Part 2
- tsconfig-helper repository
- My English Twitter and Russian Twitter
Refactoring.Guru - всё про рефакторинг: что такое рефакторинг, как понять, что настало время проводить рефакторинг, как его проводить, паттерны проектирования с примерами на многих языках, включая TypeScript.
- init-typescript-app - мой пакет для разворачивания проектов, на котором был создан проект для презентации. Возможность выбирать "строгость" TypeScript для новичков или опытных, публикация вашего пакета в NPM.
- TSDX - разворачивание TypeScript проекта, prettier, rollup, eslint
- oclif и Gluegun - разворачивание TypeScript для создания CLI утилит
- Nest TypeScript Starter - официальный темплейт для создания бекенд-приложений на NestJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {container} from 'tsyringe'; | |
import admin, {type ServiceAccount, type app} from 'firebase-admin'; | |
import {type Firestore} from 'firebase-admin/firestore'; | |
import serviceAccount from '../../serviceAccountKey.json'; | |
export function buildDependencyContainer(): void { | |
const firebaseApp = admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount as ServiceAccount) | |
}); | |
container.register<app.App>('firebaseApp', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gist name placeholder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/a/74891854/3359277 | |
export function typeSafeObjectEntries< | |
T extends { [key: string | number | symbol]: unknown }, | |
K extends keyof T, | |
V extends T[K] | |
>(o: T) { | |
return Object.entries(o) as unknown as [K, V][]; | |
} |
OlderNewer