Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

typescript combine interfaces

interface IClientRequestAndCoords extends IClientRequest, ICoords {} 

function(data: IClientRequestAndCoords) 

//OR

interface ClientRequest {
  userId:     number
  sessionKey: string
}

interface Coords {
  lat:  number
  long: number
}

function log(data: ClientRequest & Coords) { 
  console.log(
    data.userId,
    data.sessionKey,
    data.lat,
    data.long
  );
}
Comment

PREVIOUS NEXT
Code Example
Typescript :: tar contents of current folder 
Typescript :: calling contract in ether.js 
Typescript :: typescript one of the array items 
Typescript :: c# check list of objects for value 
Typescript :: typescript err type 
Typescript :: google_fonts pub.de 
Typescript :: typescript null and undefined check 
Typescript :: loop two lists python 
Typescript :: Parameter type from function TypeScript 
Typescript :: compare two lists and remove duplicates java 
Typescript :: custom link react 
Typescript :: flutter web keep focus on textfield 
Typescript :: nest js null exclude 
Typescript :: preventing letters from being placed in an input ts 
Typescript :: angular cancel http request 
Typescript :: declare array typescript 
Typescript :: get top elements from a list python 
Typescript :: destroy objects when they move below camera unity 
Typescript :: mailbox exists c# 
Typescript :: matlab components area 
Typescript :: Why do we use fragments in react? 
Typescript :: uat testing vs system testing 
Typescript :: ERROR Error: mat-form-field must contain a MatFormFieldControl. 
Typescript :: type definition method typescript 
Typescript :: react native paper menu item press not working 
Typescript :: ts foreach property ts 
Typescript :: Cave Generator 
Typescript :: store all years in array angular 
Typescript :: Building a maven EAR project and specifying the configuration of which projects to include, what is the element in the plugin configuration that contains Enterprise Java Bean Projects: 
Typescript :: get required schema fields name into array mongoose typescript 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =