Question #189

Author: admin
tags: TypeScript  
New type was created:
type SomeType = keyof string;
Choose the answers that will NOT give the "is not assignable to type" error.
const x: SomeType = 'itquiz';
const x: SomeType = 'includes';
const x: SomeType = 100;
const x: SomeType = 'questions';
const x: SomeType = {
  'somekey': 'somevalue'
};
In JavaScript primitive values don't have any properties. They are not objects.
But in runtime JavaScript wraps primitive values into the corresponding wrapper objects.
When using keyof with types of primitive values, the operator gets all types of keys from object wrapper (String(), Number(), etc.).
Rate the difficulty of the question:
easyhard