2
0

初始化项目

This commit is contained in:
caiyuchao
2024-11-14 11:06:38 +08:00
parent 988b9e6799
commit 4ffac789e1
320 changed files with 34244 additions and 0 deletions

25
src/typings/common.d.ts vendored Normal file
View File

@@ -0,0 +1,25 @@
/** The common type namespace */
declare namespace CommonType {
/** The strategic pattern */
interface StrategicPattern {
/** The condition */
condition: boolean;
/** If the condition is true, then call the action function */
callback: () => void;
}
/**
* The option type
*
* @property value: The option value
* @property label: The option label
*/
type Option<K = string> = { value: K; label: string };
type YesOrNo = 'Y' | 'N';
/** add null to all properties */
type RecordNullable<T> = {
[K in keyof T]?: T[K] | null;
};
}