(1) The Selection object doesn't have the createRange method (can also be seen in the lib.d.ts definition).
Instead you should use document.createRange:
var textRange = document.createRange();
(2) The createTextRange is an IE only thing (CreateTextRange is not working in Chrome), it's not a standard.
There's an issue for that: 'createTextRange' seems to be missing from 'lib.dom.d.ts' and other including libs which says:
this is a break because this is an IE-only API. Users can augment the
interfaces if necessary
So you can do this:
interface TextRange {
...
}
interface HtmlElement {
createTextRange(): TextRange;
}
(3) The focus() part works well, the compiler has no issues with it.
Edit
The Node object doesn't have the focus() method, so you need to cast it:
var el = document.getElementById(divId).childNodes[0] as HTMLElement;
el.focus(); // works now