Add TypeScript Reference finally in right place with on grouping