briefy / notes

notes to problems encountered
1 stars 0 forks source link

ts everything #12

Open briefy opened 7 years ago

briefy commented 7 years ago

TSLint apply those rule gradually to make your code in ts better.

briefy commented 7 years ago

interface MyFunctionWithStatics extends MyFunction { resolve(id: string): string; cache: any; extensions: any; main: string; }

/ implementation ONE / function myFunc(id:string){} namespace myFunc{ export function resolve(id:string):string{ return id}; export let cache:any; export let extensions: any; export let main:string } let impl : MyFunctionWithStatics= myFunc

/ implementation SECOND / function myFunc(id:string){} let impl: MyFunctionWithStatics = myFunc; / just initialize static properties here/

briefy commented 7 years ago