mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 16:42:28 +03:00
10 lines
280 B
TypeScript
10 lines
280 B
TypeScript
// Loaded from https://deno.land/x/validasaur/src/rules/not_null.ts
|
|
|
|
|
|
import type { Validity } from "../types.ts";
|
|
import { invalid } from "../utils.ts";
|
|
|
|
export function notNull(value: any): Validity {
|
|
return value === null ? invalid("notNull", { value }, true) : undefined;
|
|
}
|