This file contains hidden or 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
type ElementOrSelector = HTMLElement | string; | |
export const deepContains = ( | |
parents: ElementOrSelector | ElementOrSelector[], | |
children: HTMLElement | |
): boolean => { | |
if (!Array.isArray(parents)) | |
parents = [parents]; | |
let node: HTMLElement | null = children; |
This file contains hidden or 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
declare type With< | |
TObject, | |
TRequired extends (keyof TObject) | {[key in keyof TObject]?: any}, | |
TAdditionnal extends {[key: string]: any} = {} | |
> = ( | |
Omit<TObject, TRequired extends (keyof TObject) ? TRequired : keyof TRequired> | |
& | |
(TRequired extends (keyof TObject) ? Required<Pick<TObject, TRequired>> : TRequired) | |
& | |
TAdditionnal |
This file contains hidden or 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
// Quelques déclarations ... | |
export default { | |
context: ROOT_DIR, | |
name: 'server', | |
target: 'node', | |
mode: 'development', |
This file contains hidden or 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 { Model } from 'sequelize'; | |
import { Utilisateur, Contenu, Publicite } from '@/serveur/modeles'; | |
export default class Event extends Model { | |
public id!: number; | |
public date!: Date; | |
public type!: number; | |
public utilisateur_id!: number; |