<ol dir="auto">
<li>
<p dir="auto">I want to see .d.ts for <code class="notranslate">@types/X</code> package without cloning repo.<br>
But when I open types folder on github I see following error, and <code class="notranslate">X</code> folder is not listed.<br>
<code class="notranslate">Sorry, we had to truncate this directory to 1,000 files. 3,413 entries were omitted from the list.</code></p>
</li>
<li>
<p dir="auto">I want to see what issues already filed for <code class="notranslate">@types/X</code> and file new one.<br>
But when I open issues tab I see &gt;2k entries for all the packages... I wonder how contributors even find issues filed for their definitions (or they don't?).</p>
</li>
</ol>
<p dir="auto">Why typings do not live in separate repos? Isn't this monorepo a total mess?</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/swaggerize-express</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>.  (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: @....</li>
</ul>
</li>
</ul>
<p dir="auto">Currently both <code class="notranslate">swaggerize-express</code> and <code class="notranslate">swagger-schema-official</code> have complete type definitions for the openAPI specification. However, there are a few slight inconsistencies between the two which make it hard to use them in tandem. For example:</p>
<p dir="auto">having installed the following:</p>
<ul dir="auto">
<li><code class="notranslate">@types/swaggerize-express@4.0.28</code></li>
<li><code class="notranslate">@types/swagger-schema-official@2.0.2</code></li>
</ul>
<p dir="auto">The following issues a compiler error (under <code class="notranslate">typescript@2.2.2</code>):</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as swaggerize from 'swaggerize-express';
import { Spec } from 'swagger-schema-official';

declare var spec_swagger_schema_official: Spec;
declare var spec_swaggerize_express: swaggerize.Swagger.ApiDefinition;

/**
 * type error here, when the object should be of the same type,
 * as both should be valid openAPI schema
 */
spec_swagger_schema_official = spec_swaggerize_express;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">swaggerize</span> <span class="pl-k">from</span> <span class="pl-s">'swaggerize-express'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">Spec</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'swagger-schema-official'</span><span class="pl-kos">;</span>

<span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">spec_swagger_schema_official</span>: <span class="pl-smi">Spec</span><span class="pl-kos">;</span>
<span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">spec_swaggerize_express</span>: <span class="pl-s1">swaggerize</span><span class="pl-kos">.</span><span class="pl-smi">Swagger</span><span class="pl-kos">.</span><span class="pl-smi">ApiDefinition</span><span class="pl-kos">;</span>

<span class="pl-c">/**</span>
<span class="pl-c"> * type error here, when the object should be of the same type,</span>
<span class="pl-c"> * as both should be valid openAPI schema</span>
<span class="pl-c"> */</span>
<span class="pl-s1">spec_swagger_schema_official</span> <span class="pl-c1">=</span> <span class="pl-s1">spec_swaggerize_express</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Specifically,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ts]
Type 'ApiDefinition' is not assignable to type 'Spec'.
  Types of property 'definitions' are incompatible.
    Type 'DefinitionsObject | undefined' is not assignable to type '{ [definitionsName: string]: Schema; } | undefined'.
      Type 'DefinitionsObject' is not assignable to type '{ [definitionsName: string]: Schema; } | undefined'.
        Type 'DefinitionsObject' is not assignable to type '{ [definitionsName: string]: Schema; }'.
          Index signatures are incompatible.
            Type 'SchemaObject' is not assignable to type 'Schema'.
              Types of property 'allOf' are incompatible.
                Type 'IJsonSchema[] | undefined' is not assignable to type 'Schema[] | undefined'.
                  Type 'IJsonSchema[]' is not assignable to type 'Schema[] | undefined'.
                    Type 'IJsonSchema[]' is not assignable to type 'Schema[]'.
                      Type 'IJsonSchema' is not assignable to type 'Schema'.
                        Types of property 'allOf' are incompatible.
                          Type 'IJsonSchema[] | undefined' is not assignable to type 'Schema[] | undefined'.
                            Type 'IJsonSchema[]' is not assignable to type 'Schema[] | undefined'.
                              Type 'IJsonSchema[]' is not assignable to type 'Schema[]'.
                                Type 'IJsonSchema' is not assignable to type 'Schema'."><pre class="notranslate"><code class="notranslate">[ts]
Type 'ApiDefinition' is not assignable to type 'Spec'.
  Types of property 'definitions' are incompatible.
    Type 'DefinitionsObject | undefined' is not assignable to type '{ [definitionsName: string]: Schema; } | undefined'.
      Type 'DefinitionsObject' is not assignable to type '{ [definitionsName: string]: Schema; } | undefined'.
        Type 'DefinitionsObject' is not assignable to type '{ [definitionsName: string]: Schema; }'.
          Index signatures are incompatible.
            Type 'SchemaObject' is not assignable to type 'Schema'.
              Types of property 'allOf' are incompatible.
                Type 'IJsonSchema[] | undefined' is not assignable to type 'Schema[] | undefined'.
                  Type 'IJsonSchema[]' is not assignable to type 'Schema[] | undefined'.
                    Type 'IJsonSchema[]' is not assignable to type 'Schema[]'.
                      Type 'IJsonSchema' is not assignable to type 'Schema'.
                        Types of property 'allOf' are incompatible.
                          Type 'IJsonSchema[] | undefined' is not assignable to type 'Schema[] | undefined'.
                            Type 'IJsonSchema[]' is not assignable to type 'Schema[] | undefined'.
                              Type 'IJsonSchema[]' is not assignable to type 'Schema[]'.
                                Type 'IJsonSchema' is not assignable to type 'Schema'.
</code></pre></div>
<p dir="auto">My proposal would be to use <code class="notranslate">@types/swagger-schema-official</code> within  <code class="notranslate">@types/swaggerize-express</code> so there is only one location to maintain, and we don't run into minor inconsistencies.</p>
<p dir="auto">Authors of both definitions (<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mohsen1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mohsen1">@mohsen1</a> for <code class="notranslate">@types/swagger-schema-official</code> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/MugeSo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/MugeSo">@MugeSo</a> for <code class="notranslate">@types/swaggerize-express</code>) have any thoughts?</p>