mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-18 18:56:24 +00:00
misc: Add Nullable<T> helper type
Change-type: minor Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
0505c0f976
commit
d1e1297f6d
@ -10,8 +10,7 @@ export interface CheckIntOptions {
|
||||
const ENV_VAR_KEY_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
||||
const LABEL_NAME_REGEX = /^[a-zA-Z][a-zA-Z0-9\.\-]*$/;
|
||||
|
||||
type NullableString = string | undefined | null;
|
||||
type NullableLiteral = number | NullableString;
|
||||
type NullableLiteral = Nullable<number | string>;
|
||||
|
||||
/**
|
||||
* checkInt
|
||||
|
2
typings/global.d.ts
vendored
2
typings/global.d.ts
vendored
@ -5,3 +5,5 @@ interface Dictionary<T> {
|
||||
interface Callback<T> {
|
||||
(err?: Error, res?: T): void;
|
||||
}
|
||||
|
||||
type Nullable<T> = T | null | undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user