refactor(yaml): cleanup str type (#5879)

initial commit
This commit is contained in:
Tim Reichen 2024-09-03 00:05:03 +02:00 committed by GitHub
parent e92bc0cced
commit f80d8d1519
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,11 +6,7 @@ import type { Type } from "../_type.ts";
export const str: Type<"scalar", string> = {
tag: "tag:yaml.org,2002:str",
resolve() {
return true;
},
construct(data): string {
return data !== null ? data : "";
},
kind: "scalar",
resolve: (): boolean => true,
construct: (data: string | null): string => data !== null ? data : "",
};