Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript interface function

type ErrorHandler = (error: IError) => void // type for only one function
// or
interface IErrorHandler {
  ErrorHander: (error: IError) => void
}
    
// IError Interface if interest
interface IError {
  error: string;
  status: number;
  message: string;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #interface #function
ADD COMMENT
Topic
Name
6+7 =