13-shiki-richhover×11 query error completionall
// Ported from @shikijs/twoslash docs (rendererRich showcase): a Readonly<T>
// query, a read-only-assignment error, and a completion list in one snippet.
interface 
interface Todo
Todo
{
(property) Todo.title: string
title
: string
} const
const todo: Readonly<Todo>
todo
:
type Readonly<T> = { readonly [P in keyof T]: T[P]; }

Make all properties in T readonly

Readonly
<
interface Todo
Todo
> = {
title: 'Delete inactive users'.
(method) String.toUpperCase(): string

Converts all the alphabetic characters in a string to uppercase.

toUpperCase
(),
(property) title: string
}
const todo: Readonly<Todo>
todo
.
(property) title: any
title
= 'Hello'
Cannot assign to 'title' because it is a read-only property.
var Number: NumberConstructor

An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers.

Number
.
(method) NumberConstructor.parseInt(string: string, radix?: number): number

Converts A string to an integer.

@paramstring A string to convert into a number.@paramradix A value between 2 and 36 that specifies the base of the number in string. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.
parseInt
('123', 10)
  • parseFloat
  • parseInt
  • prototype