“Type TypeScript Push” Kode Jawaban

Dorong dalam naskah

var numbers = new Array(1, 4, 9); 
var length = numbers.push(10); 
console.log("new numbers is : " + numbers );  
length = numbers.push(20); 
console.log("new numbers is : " + numbers );
Panicky Penguin

Type TypeScript Push

//push
type Push<T extends Array<unknown>, U> = [...T, U];
type pushArray = Push<['a', 'b'], 'c'>;
Husnain Syed

Jawaban yang mirip dengan “Type TypeScript Push”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya