# Disable Top-Level await (`ts-compat/no-top-level-await`) top-level-await is not support in most build tool. ## Rule Details Examples of **incorrect** code for this rule: ```ts await Promise.resolve() ``` Examples of **correct** code for this rule: ```ts Promise.resolve().then(()=>{ }); async function aaa() { await Promise.resolve() } ``` ## When Not To Use It Build tool supports top-level-await. ## Further Reading