Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

TypeScript definitions for MusicKit JS

I take that MusicKit JS is built with TypeScript, based on the attributions in the script: https://js-cdn.music.apple.com/musickit/v3/musickit.js

In the script it points to https://js-cdn.music.apple.com/musickit/v1/acknowledgements.txt – I assume this should be the v3 URL for the v3 version? It returns the same content nonetheless.

This contains attributions for TypeScript.

Currently there's a third-party effort with DefinitelyTyped, which publishes the NPM package @types/musickit-js. The latest supported version available is v1.

However, there is no version compatible with v3.

This makes it hard to use MusicKit JS v3 in a TypeScript project.

Please publish the types, ideally on the CDN along with the musickit.js file. Also consider publishing an officially Apple supported DefinitelyTyped package, or help to maintain the existing @types/musickit-js to make consuming this even easier.

Related v3 discussion on the DefinitelyTyped repo: https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/72966

I've created an example app that highlights the use of typings in a TypeScript based project, and the race condition I encountered due to outdated third party typings.

https://github.com/bgever/musickitjs-v3-types

It's frustrating to only get half the tools to work with.

I came looking for MapKit Types and your post reminded me why I ended up rage-quitting a MusicKit idea a year-or-so ago.

Apple devs, please supply Type definitions for *Kit JS frameworks.

TypeScript definitions for MusicKit JS
 
 
Q