Skip to content

Commit b895e29

Browse files
committed
ref: Replace structural SchemaGuardInput with TypeSchemaGuardInput
1 parent 608e709 commit b895e29

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/typeschema/types.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,41 +181,41 @@ export type TypeSchema =
181181
| BindingTypeSchema
182182
| ProfileTypeSchema;
183183

184-
type SchemaGuardInput = { identifier: TypeIdentifier } | undefined;
184+
type TypeSchemaGuardInput = TypeSchema | NestedTypeSchema | undefined;
185185

186-
export const isSpecializationTypeSchema = (schema: SchemaGuardInput): schema is SpecializationTypeSchema => {
186+
export const isSpecializationTypeSchema = (schema: TypeSchemaGuardInput): schema is SpecializationTypeSchema => {
187187
return (
188188
schema?.identifier.kind === "resource" ||
189189
schema?.identifier.kind === "complex-type" ||
190190
schema?.identifier.kind === "logical"
191191
);
192192
};
193193

194-
export const isComplexTypeTypeSchema = (schema: SchemaGuardInput): schema is ComplexTypeTypeSchema => {
194+
export const isComplexTypeTypeSchema = (schema: TypeSchemaGuardInput): schema is ComplexTypeTypeSchema => {
195195
return schema?.identifier.kind === "complex-type";
196196
};
197197

198-
export const isResourceTypeSchema = (schema: SchemaGuardInput): schema is ResourceTypeSchema => {
198+
export const isResourceTypeSchema = (schema: TypeSchemaGuardInput): schema is ResourceTypeSchema => {
199199
return schema?.identifier.kind === "resource";
200200
};
201201

202-
export const isPrimitiveTypeSchema = (schema: SchemaGuardInput): schema is PrimitiveTypeSchema => {
202+
export const isPrimitiveTypeSchema = (schema: TypeSchemaGuardInput): schema is PrimitiveTypeSchema => {
203203
return schema?.identifier.kind === "primitive-type";
204204
};
205205

206-
export const isLogicalTypeSchema = (schema: SchemaGuardInput): schema is LogicalTypeSchema => {
206+
export const isLogicalTypeSchema = (schema: TypeSchemaGuardInput): schema is LogicalTypeSchema => {
207207
return schema?.identifier.kind === "logical";
208208
};
209209

210-
export const isProfileTypeSchema = (schema: SchemaGuardInput): schema is ProfileTypeSchema => {
210+
export const isProfileTypeSchema = (schema: TypeSchemaGuardInput): schema is ProfileTypeSchema => {
211211
return schema?.identifier.kind === "profile";
212212
};
213213

214-
export const isBindingSchema = (schema: SchemaGuardInput): schema is BindingTypeSchema => {
214+
export const isBindingSchema = (schema: TypeSchemaGuardInput): schema is BindingTypeSchema => {
215215
return schema?.identifier.kind === "binding";
216216
};
217217

218-
export const isValueSetTypeSchema = (schema: SchemaGuardInput): schema is ValueSetTypeSchema => {
218+
export const isValueSetTypeSchema = (schema: TypeSchemaGuardInput): schema is ValueSetTypeSchema => {
219219
return schema?.identifier.kind === "value-set";
220220
};
221221

0 commit comments

Comments
 (0)