Skip to content

Instantly share code, notes, and snippets.

Avatar

Cyrille Tuzi cyrilletuzi

View GitHub Profile
View .eslintrc.json
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-explicit-any": "error"
}
}
View demo.ts
function test(hello: any, world = '') {
hello; // any
world; // string
}
View tsconfig.json
{
"compilerOptions": {
"strict": true
}
}
View demo.ts
function test(hello: string, world = '') {
hello; // string
world; // string
}
View demo.ts
function test(hello, world = '') {
hello; // any
world; // string
}
View lazy.ts
const routes: Routes = [
{ path: 'admin', loadChildren: () => import('./admin/admin.module').then((m) => m.AdminModule)}
];
View jquery.js
$('#slideshow').slideshow();
View classe.js
const recette = new RecetteDeMousseAuChocolat();
recette.faireLaMousse();
View classe.js
class RecetteDeMousseAuChocolat {
oeufs = 5;
chocolat = '200g';
cuireAuBainMarie() {
// Cuit le chocolat au bain marie
cuire(this.chocolat);
}