
Your options are either to use -polyfill from MDN or to use -indexof () var str 'abcde' var n str. You can find those in the Template Literal Types documentation. includes () is not supported by most browsers. To help with string manipulation around template string literals, TypeScript includes a set of types which can be used in string manipulation within the type system. Intrinsic String Manipulation Types Uppercase Lowercase Capitalize Uncapitalize Beyond being recognized in the contextual type of an object literal, the interface acts like any empty interface.

The ThisType marker interface is simply an empty interface declared in lib.d.ts. Notice how the type of the methods property simultaneously is an inference target and a source for the this type in methods. In the example above, the methods object in the argument to makeObject has a contextual type that includes ThisType and therefore the type of this in methods within the methods object is.
