Pertanyaan yang diberi tag «typescript2.0»

2
Apa jenis Catatan dalam naskah?
Apa yang dimaksud Record<K, T>dalam naskah? Jenis naskah 2.1 memperkenalkan Recordjenis tersebut, menjelaskannya dalam contoh: // For every properties K of type T, transform it to U function mapObject<K extends string, T, U>(obj: Record<K, T>, f: (x: T) => U): Record<K, U> lihat naskah 2.1 Dan Jenis Lanjutan halaman menyebutkan …

12
TypeScript dan React - tipe anak-anak?
Saya memiliki komponen fungsional yang sangat sederhana sebagai berikut: import * as React from 'react'; export interface AuxProps { children: React.ReactNode } const aux = (props: AuxProps) => props.children; export default aux; Dan komponen lainnya: import * as React from "react"; export interface LayoutProps { children: React.ReactNode } const layout …

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.