These are chat archives for DefinitelyTyped/DefinitelyTyped

16th
Jun 2015
Basarat Ali Syed
@basarat
Jun 16 2015 00:07
@mohsen1 Think about the js you want to write.
I think (I don't know the JS you want to write) you would want (note: interface not class):
declare module Swagger {
  export interface Info {
    title: string;
    description: string;
    version: string;
  }

  export interface Spec {
    info: Info;
  }
}
And drop the unneeded Swagger for SwaggerSpec inside Swagger
Mohsen Azimi
@mohsen1
Jun 16 2015 02:17
@basarat I made some progress with interfaces. Now I want to test my interfaces, how should I do it? I have large Swagger JSON files that I want to make sure they are conforming to the interface. In this SO question I described my question: http://stackoverflow.com/questions/30856758/test-if-an-object-conforms-to-an-interface-in-typescript
Mohsen Azimi
@mohsen1
Jun 16 2015 03:40
Thank you @basarat