Difference between Fortran’s “abstract” and “normal” interfaces

The “normal” interfaces — known by the standard as specific interface blocks (as you use in the title of the question) — are just normal interface blocks for some procedure. Therefore: interface subroutine foo_sub end subroutine end interface means that there exists an actual (external) subroutine named foo_sub and it conforms to the specified interface. … Read more

Is it possible to inject interface with angular2?

No, interfaces are not supported for DI. With TypeScript interfaces are not available at runtime anymore, only statically and therefore can’t be used as DI tokens. Alternatively you can use strings as keys or InjectionToken provide(‘CoursesServiceInterface’, {useClass: CoursesServiceMock}) // old providers: [{provide: ‘CoursesServiceInterface’, useClass: CoursesServiceMock}] and inject it like constructor(@Inject(‘CoursesServiceInterface’) private coursesService:CoursesServiceInterface) {} See also … Read more

Why shared libraries between microservices are bad? [closed]

The evils of too much coupling between services are far worse than the problems caused by code duplication The author is very unspecific when he uses the generic word “coupling”. I would agree with certain types of coupling being a strict no-no (like sharing databases or using internal interfaces). However the use of common libraries … Read more

Extend interface defined in .d.ts file

// How to extend Validator interface adding isArray() method?? You cannot do this in a file that is a module (some guidance here) and your file is a module because you have import expressValidator. Instead create a extendedValidator.d.ts and add the new stuff for TypeScript’s engine: declare module ExpressValidator { export interface Validator { isArray: … Read more

Implementing TypeScript interface with bare function signature plus other fields

A class cannot implement everything that is available in a typescript interface. Two prime examples are callable signatures and index operations e.g. : Implement an indexible interface The reason is that an interface is primarily designed to describe anything that JavaScript objects can do. Therefore it needs to be really robust. A TypeScript class however … Read more