mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 16:46:34 +03:00
chore: ts updates
This commit is contained in:
parent
2c836f8107
commit
8e8d9d8995
|
@ -27,6 +27,10 @@ import {
|
|||
} from '../../services/';
|
||||
import { LazyTasksService } from '../../shared/components/LazyFor/lazy-for';
|
||||
|
||||
function getPreOptions() {
|
||||
return Redoc._preOptions || {};
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'redoc',
|
||||
templateUrl: './redoc.html',
|
||||
|
@ -49,14 +53,14 @@ export class Redoc extends BaseComponent implements OnInit {
|
|||
|
||||
loadingProgress: number;
|
||||
|
||||
private element: HTMLElement;
|
||||
private $parent: Element;
|
||||
private $refElem: Element;
|
||||
|
||||
@Input() specUrl: string;
|
||||
@HostBinding('class.loading') specLoading: boolean = false;
|
||||
@HostBinding('class.loading-remove') specLoadingRemove: boolean = false;
|
||||
|
||||
private element: HTMLElement;
|
||||
private $parent: Element;
|
||||
private $refElem: Element;
|
||||
|
||||
constructor(
|
||||
specMgr: SpecManager,
|
||||
optionsMgr: OptionsService,
|
||||
|
@ -69,7 +73,7 @@ export class Redoc extends BaseComponent implements OnInit {
|
|||
super(specMgr);
|
||||
SchemaHelper.setSpecManager(specMgr);
|
||||
// merge options passed before init
|
||||
optionsMgr.options = Redoc._preOptions || {};
|
||||
optionsMgr.options = getPreOptions();
|
||||
|
||||
this.element = elementRef.nativeElement;
|
||||
this.$parent = this.element.parentElement;
|
||||
|
|
|
@ -8,13 +8,12 @@ import {
|
|||
FormDataParameter,
|
||||
Spec,
|
||||
Response
|
||||
} from '@types/swagger-schema-official';
|
||||
} from 'swagger-schema-official';
|
||||
|
||||
export interface RedocInjectedPointer {
|
||||
_pointer?: string;
|
||||
}
|
||||
|
||||
|
||||
export interface SwaggerOperation extends Operation, RedocInjectedPointer {}
|
||||
export interface SwaggerBodyParameter extends BodyParameter, RedocInjectedPointer {}
|
||||
export interface SwaggerHeaderParameter extends HeaderParameter, RedocInjectedPointer {}
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
"@types/jasmine": "^2.5.47",
|
||||
"@types/requirejs": "^2.1.29",
|
||||
"@types/should": "^8.3.0",
|
||||
"@types/swagger-schema-official": "^2.0.4",
|
||||
"@types/swagger-schema-official": "^2.0.5",
|
||||
"@types/webpack": "^2.2.15",
|
||||
"angular2-template-loader": "^0.6.2",
|
||||
"awesome-typescript-loader": "^3.1.3",
|
||||
|
@ -113,6 +113,7 @@
|
|||
"stream-http": "^2.7.0",
|
||||
"string-replace-webpack-plugin": "^0.1.3",
|
||||
"style-loader": "^0.17.0",
|
||||
"swagger-schema-official": "^2.0.0-bab6bed",
|
||||
"ts-helpers": "^1.1.1",
|
||||
"tslint": "^5.2.0",
|
||||
"typescript": "^2.3.2",
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
"types": [
|
||||
"jasmine",
|
||||
"should",
|
||||
"webpack"
|
||||
"webpack",
|
||||
"swagger-schema-official"
|
||||
],
|
||||
"outDir": "dist",
|
||||
"lib": [
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
"dom"
|
||||
],
|
||||
"types": [
|
||||
"webpack"
|
||||
"webpack",
|
||||
"swagger-schema-official"
|
||||
]
|
||||
},
|
||||
"exclude": [
|
||||
|
|
Loading…
Reference in New Issue
Block a user