in src/powerquery-parser/language/type/typeUtils/isType.ts [167:197]
export function isTPrimitiveType(type: Type.TPowerQueryType): type is Type.TPrimitiveType {
switch (type.kind) {
case Type.TypeKind.Action:
case Type.TypeKind.Any:
case Type.TypeKind.AnyNonNull:
case Type.TypeKind.Binary:
case Type.TypeKind.Date:
case Type.TypeKind.DateTime:
case Type.TypeKind.DateTimeZone:
case Type.TypeKind.Duration:
case Type.TypeKind.Function:
case Type.TypeKind.List:
case Type.TypeKind.Logical:
case Type.TypeKind.None:
case Type.TypeKind.Null:
case Type.TypeKind.Number:
case Type.TypeKind.Record:
case Type.TypeKind.Table:
case Type.TypeKind.Text:
case Type.TypeKind.Time:
case Type.TypeKind.Type:
return type.maybeExtendedKind === undefined;
case Type.TypeKind.Unknown:
case Type.TypeKind.NotApplicable:
return false;
default:
throw Assert.isNever(type);
}
}