Re: TypeScript types for the Built-in AI APIs

49 views
Skip to first unread message

Thomas Steiner

unread,
Sep 9, 2024, 12:43:28 PM9/9/24
to Thomas Steiner, Chrome Built-in AI Early Preview Program Discussions, Pascal Birchler, Christian Liebel
Adding the discussion mailing list, so people can discuss this :-) if need be, apart from the announcement list.

On Mon, Sep 9, 2024 at 6:16 PM Thomas Steiner <to...@google.com> wrote:
Hey all,

Building upon previous work by Googler @Pascal Birchler, one of our Google Developer Experts (GDE), @Christian Liebel, has stepped up and created TypeScript types for our Built-in AI APIs, with a commitment to keep them maintained (to support Christ, I'm a co-owner, too). Pascal has already migrated his WordPress AI experiments to depend on the package with no issues. If you spot a problem in the source code, please let us know by filing an Issue.

Screenshot 2024-09-09 at 18.07.39.png

Install these types with npm:

npm install --save-dev @types/dom-chromium-ai

Your IDE should then pick them up, and code completion should work as in the screenshot. If it doesn't, add a comment to the beginning of the relevant file:

/// <reference types="dom-chromium-ai" />

We're confident that this will make your coding experience a lot better 😆. Thanks to everyone involved in making this happen!

Cheers,
Tom 
Reply all
Reply to author
Forward
0 new messages