Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
95th committed Nov 21, 2022
1 parent 3a408e2 commit 08e1fd3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ export type NestedContext<S extends NestedContext<''>> = '' | `(${S})`
export type NestedContextDefault<S extends NestedContextDefault = ''> = '' | `(${S})`

export type Whatever<S extends number> = `Hello ${S}`
export type WhateverDefault<S extends number = 2> = `Hello ${S}`
export type WhateverDefault<S extends number = 2> = `Hello ${S}`

// Invalid
export type Invalid<S extends number> = `Hello ${T}`
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ export type NestedContextDefault<S extends NestedContextDefault = ''> = '' | `($

export type Whatever<S extends number> = `Hello ${S}`
export type WhateverDefault<S extends number = 2> = `Hello ${S}`

// Invalid
export type Invalid<S extends number> = `Hello ${T}`
```

# Diagnostics
```
noUndeclaredVariables.ts:12:50 lint/correctness/noUndeclaredVariables ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! The T variable is undeclared
11 │ // Invalid
> 12 │ export type Invalid<S extends number> = `Hello ${T}`
│ ^
```


0 comments on commit 08e1fd3

Please sign in to comment.