Skip to content

Commit

Permalink
Rename missing parts
Browse files Browse the repository at this point in the history
  • Loading branch information
sametcelikbicak authored Sep 4, 2024
1 parent ac9d55e commit 4614d21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions book-content/chapters/13-modules-scripts-declaration-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ type Album = {
// ---cut---
// inside musicUtils.ts
declare global {
declare const ALBUM_API: {
declare const MUSIC_API: {
getAlbumInfo(upc: string): Promise<Album>;
searchAlbums(query: string): Promise<Album[]>;
};
Expand All @@ -356,14 +356,14 @@ This almost works, except for the error. We can't use `declare` inside an ambien
// inside musicUtils.ts

declare global {
const ALBUM_API: {
const MUSIC_API: {
getAlbumInfo(upc: string): Promise<Album>;
searchAlbums(query: string): Promise<Album[]>;
};
}
```

Now the `ALBUM_API` variable has been put into the global scope.
Now the `MUSIC_API` variable has been put into the global scope.

### `declare module`

Expand Down

0 comments on commit 4614d21

Please sign in to comment.