Added onPrepare and onGet support for DocumenTypeScript