Upgrade to Pro — share decks privately, control downloads, hide ads and more …

型定義でAIと会話する:型を通じてAIに意図を伝えるテクニック

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for uhyo uhyo
February 04, 2026

 型定義でAIと会話する:型を通じてAIに意図を伝えるテクニック

2026-02-04 レバテックLAB 型定義&インタラクションテストでAIフロントエンド開発のガードレールを整備する

Avatar for uhyo

uhyo

February 04, 2026
Tweet

More Decks by uhyo

Other Decks in Technology

Transcript

  1. 実際の例 AIが実装したもの: // 何か返り値がある…… const { blocked, resume } =

    useBlocker(() => { return confirm(“離脱しますか?”); }); 7
  2. 型レベルテストの例 import { assertType, expectTypeOf } from 'vitest’ it(‘returns nothing’,

    () => { const result = myFunction({ … }); expectTypeof(result).toBeVoid(); }); 22