Skip to content

Instantly share code, notes, and snippets.

View fzed51's full-sized avatar
πŸ‘¨β€πŸ’»
I may be slow to respond.

Fabien S. fzed51

πŸ‘¨β€πŸ’»
I may be slow to respond.
View GitHub Profile
@fzed51
fzed51 / packages.md
Last active August 21, 2023 07:13
Gestion des versions de package dans un workspaces de yarn
  • ./package.json
{
  "private": true,
  "workspaces": {
    "packages": [
      "./packages/*"
    ]
 },
@fzed51
fzed51 / types.ts
Created September 21, 2024 09:35
[TS] array to enum
export const statusList = [
"enable",
"disable",
] as const;
export type Status = (typeof statusList)[number];
export const Status = Object.fromEntries(statusList.map(v => [v, v])) as {
[K in Status]: K;
};
//
@fzed51
fzed51 / react-snippets.code-snippets
Last active May 16, 2025 11:56
snippets for vscode
{
"React Component": {
"prefix": "rc",
"body": [
"interface ${1:${RELATIVE_FILEPATH/.+[\\\/]([^\\\/]+)(?:\\\/index\\.tsx$)|.+[\\\/]([^\\\/]+)\\.tsx$/${1:/pascalcase}${2:/pascalcase}/}}Props { $2}",
"",
"export function ${1}({ $3}: ${1}Props) {",
" return (<>${4:${1}}</>);",
"}",
"",