Modification du fichier de configuration de TypeScript (notamment mode STRICT) + adaptation de la classe vCarousel
This commit is contained in:
parent
bf78ef21d5
commit
687cef9a74
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -16,12 +16,12 @@ interface videoDOM
|
||||
export class vCarousel
|
||||
{
|
||||
private _vContainers: videoDOM[] = [];
|
||||
private _firstVideoId: string;
|
||||
private _firstVideoId: string|undefined = undefined;
|
||||
private _playFirstVideo: boolean = false;
|
||||
private _playNextVideos: boolean = false;
|
||||
private _noStop: boolean = false;
|
||||
private nbVContainers: number = 0;
|
||||
private _currentVideo: HTMLMediaElement;
|
||||
private _currentVideo: HTMLMediaElement|undefined = undefined;
|
||||
|
||||
// Les ids reçus doivent correspondre à des éléments HTML contenant une vidéo.
|
||||
set vContainers(vContainersIds: string[])
|
||||
@ -47,13 +47,13 @@ export class vCarousel
|
||||
}
|
||||
|
||||
// Si this._firstVideoId a été fourni, on vérifie qu'il est présent dans la liste des conteneurs de vidéos.
|
||||
set firstVideoId(firstVideo: string)
|
||||
set firstVideoId(firstVideo: string|undefined)
|
||||
{
|
||||
if((firstVideo!=="" && this._vContainers.findIndex(video => video.id === firstVideo) !== -1) || (firstVideo===""))
|
||||
this._firstVideoId=firstVideo;
|
||||
}
|
||||
|
||||
get firstVideoId() : string
|
||||
get firstVideoId() : string|undefined
|
||||
{
|
||||
return this._firstVideoId;
|
||||
}
|
||||
@ -73,7 +73,7 @@ export class vCarousel
|
||||
this._noStop=noStop;
|
||||
}
|
||||
|
||||
get currentVideo() : HTMLMediaElement
|
||||
get currentVideo() : HTMLMediaElement|undefined
|
||||
{
|
||||
return this._currentVideo;
|
||||
}
|
||||
|
@ -1,14 +1,16 @@
|
||||
{
|
||||
"compilerOptions":
|
||||
{
|
||||
"outDir": "./src",
|
||||
"noImplicitAny": true,
|
||||
"module": "es6",
|
||||
"removeComments": true,
|
||||
"outDir": "./src/build",
|
||||
"module": "ES6",
|
||||
"target": "es5",
|
||||
"jsx": "react",
|
||||
"allowJs": true
|
||||
"strict":true,
|
||||
"removeComments": true,
|
||||
"allowJs": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipLibCheck": true,
|
||||
},
|
||||
"include": ["src/*.ts"],
|
||||
"exclude": ["node_modules", "**/*.spec.ts"]
|
||||
"exclude": ["src/build"]
|
||||
}
|
Loading…
Reference in New Issue
Block a user