-
Notifications
You must be signed in to change notification settings - Fork 26.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently the return type is the same when you declare a variable and when you don't. ```tsx const inter1 = Inter() const inter2 = Inter({ variable: "--inter-font" }) inter1.variable // string | undefined inter2.variable // string | undefined ``` With this change you get a type error if you try to access `.variable` without providing a variable name. ```tsx const inter1 = Inter() const inter2 = Inter({ variable: "--inter-font" }) inter1.variable // Property 'variable' does not exist on type 'NextFont'.ts(2339) inter2.variable // string ``` ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
- Loading branch information
Hannes Bornö
committed
Nov 10, 2022
1 parent
784d9a7
commit 6ab52ed
Showing
6 changed files
with
7,632 additions
and
4,437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.