import * as Type from '../type/type.js';
// biome-ignore lint/suspicious/noExplicitAny: TODO
export const isStringOrOptionalStringType = type => {
  if (type.ast && type.ast._tag === 'PropertySignatureDeclaration' && type.ast.isOptional) {
    return type.from === Type.String;
  }
  return type === Type.String;
};
// biome-ignore lint/suspicious/noExplicitAny: TODO
export const isNumberOrOptionalNumberType = type => {
  if (type.ast && type.ast._tag === 'PropertySignatureDeclaration' && type.ast.isOptional) {
    return type.from === Type.Number;
  }
  return type === Type.Number;
};
// biome-ignore lint/suspicious/noExplicitAny: TODO
export const isDateOrOptionalDateType = type => {
  if (type.ast && type.ast._tag === 'PropertySignatureDeclaration' && type.ast.isOptional) {
    return type.from === Type.Date;
  }
  return type === Type.Date;
};
// biome-ignore lint/suspicious/noExplicitAny: TODO
export const isBooleanOrOptionalBooleanType = type => {
  if (type.ast && type.ast._tag === 'PropertySignatureDeclaration' && type.ast.isOptional) {
    return type.from === Type.Boolean;
  }
  return type === Type.Boolean;
};
// biome-ignore lint/suspicious/noExplicitAny: TODO
export const isPointOrOptionalPointType = type => {
  if (type.ast && type.ast._tag === 'PropertySignatureDeclaration' && type.ast.isOptional) {
    return type.from === Type.Point;
  }
  return type === Type.Point;
};
// biome-ignore lint/suspicious/noExplicitAny: TODO
export const isOptional = type => {
  return type.ast && type.ast._tag === 'PropertySignatureDeclaration' && type.ast.isOptional;
};
//# sourceMappingURL=type-utils.js.map