// Ported and adapted from js-yaml-js-types v1.0.0:
// https://github.com/nodeca/js-yaml-js-types/tree/ac537e7bbdd3c2cbbd9882ca3919c520c2dc022b
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

import type { Type } from "../_type.ts";

export const undefinedType: Type<"scalar", undefined> = {
  tag: "tag:yaml.org,2002:js/undefined",
  kind: "scalar",
  resolve() {
    return true;
  },
  construct() {
    return undefined;
  },
  predicate(object) {
    return typeof object === "undefined";
  },
  represent() {
    return "";
  },
};

// denoCacheMetadata={"headers":{"accept-ranges":"bytes","set-cookie":"__cf_bm=5PNOhftxszdhquhFej3vGeMPNO55VP4qoK0MsksM4hg-1785241875.3767657-1.0.1.1-SQjVKs8t34ZHP_GdX4KXAdmYo.YcbXsNlaq0gXdLBnJdpOADVnOld.PBTFeQkgnSHL_7UBPT_T6BMUQQq3IlKkaGZnBZsuA3FPFhWUUhzbgDUqlCD0e_ZQDEVOFp0G1j; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","alt-svc":"h3=\":443\"; ma=86400","content-type":"text/typescript","cache-control":"public, max-age=31536000, immutable","vary":"Origin","age":"50701","x-robots-tag":"noindex","etag":"\"a6d67641c1a8c3e8342ec3bced85efa5\"","content-length":"641","cf-ray":"a223e6590e697db6-LAX","cf-cache-status":"HIT","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","access-control-allow-origin":"*","server":"cloudflare","date":"Tue, 28 Jul 2026 12:31:15 GMT","access-control-expose-headers":"*","x-content-type-options":"nosniff","x-jsr-backend":"modules","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=wzyZiACJyZwsGnP5dhpFMmM%2FtH5zt8etY52SFN3YO6aeONWNNSQCzQo%2BlYdohqeJ5jI%2BJ5vuJl5K8xwFoeQ42nnlFxthtadUqlSTn4B%2FgIQAlOcpKKF26EE%3D\"}]}","cross-origin-resource-policy":"cross-origin"},"url":"https://jsr.io/@std/yaml/1.0.5/_type/undefined.ts","time":1785241875}