feat: 'did you mean' boot hint, flow compile-time type-test, and demos

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-06-28 02:36:37 -05:00
1 parent cc0044ba6a
commit 9d8088d0a9
7 files changed
+88 -3

No files matched your search

+7
View File
@@ -108,6 +108,13 @@ test('boot fails when a handler needs something nothing provides', () => {
.toThrow(/handler 'list' needs 'missing'/);
});
it('boot error for a misspelled @needs suggests the closest token', () => {
@Step({ provides: 'user', needs: [] }) class Auth { run() { return { user: 1 }; } }
@Route('/u') class Ctl { @Get('/x') x(@needs('usr') u: any) { return { u }; } }
@Module({ mountpoint: '/api', steps: [Auth], controllers: [Ctl] }) class M {}
expect(() => createApp({ modules: [M] })).toThrow(/did you mean 'user'\?/);
});
import { Sse, Ws } from '../src/metadata';
import { inbound } from '../src/params';
import { channel } from '../src/channel';