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
""" | |
Converts Models.TextChoices to TypeScript Const. | |
Primarily used for Select Fields | |
Example: | |
Input: | |
class JobFunctionChoices(models.TextChoices): | |
MANAGER = "MANAGER", _("Manager") |
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
""" | |
Converts Django models to TypeScript types. | |
Example: | |
Input: | |
class JobTitle(GenericModel): | |
name = models.CharField( | |
_("Name"), | |
max_length=100, |
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 {SetStateAction, useCallback} from 'react'; | |
import {create} from "zustand"; | |
export type EqualityFn<T> = (left: T | null | undefined, right: T | null | undefined) => boolean; | |
export type StoreType<State> = { | |
use<K extends keyof State>( | |
key: K, | |
defaultValue?: State[K], | |
equalityFn?: EqualityFn<State[K]>, |
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
[package] | |
name = "guessing_game" | |
version = "0.1.0" | |
edition = "2021" | |
authors = ["techygrrrl", "foo <foo@example.com>", "bar <bar@example.com>", "baz <baz@example.com>"] | |
description = "This is my firrrst Rrrust app!!!!" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] |