inferRecordDeclaration

Infers a record declaration for the given type. type is the object type representing a record that we want to infer, the recordToUpdate is either the type's name or the type's root name. The kind specifies if we create a class or a struct.