myType‘ refers to a value, but is being used as a type here. Did you mean ‘typeof myType‘?

NoSuchKey