@@ -25,7 +25,7 @@ export function main(): void {
2525 }
2626 }
2727 } ) ;
28- const testNotification : any = new MockNotification ( testConfig ) ;
28+ const testNotification : MockNotification = new MockNotification ( testConfig ) ;
2929 const expectedKeyframes : NotifierAnimationPresetKeyframes = {
3030 from : {
3131 transform : `translate3d( calc( -100% - ${ testConfig . position . horizontal . distance } px - 10px ), 0, 0 )`
@@ -34,7 +34,9 @@ export function main(): void {
3434 transform : 'translate3d( 0, 0, 0 )'
3535 }
3636 } ;
37- const keyframes : NotifierAnimationPresetKeyframes = slide . show ( testNotification ) ;
37+ // tslint:disable no-any
38+ const keyframes : NotifierAnimationPresetKeyframes = slide . show ( < any > testNotification ) ;
39+ // tslint:enable no-any
3840
3941 expect ( keyframes ) . toEqual ( expectedKeyframes ) ;
4042
@@ -54,7 +56,7 @@ export function main(): void {
5456 }
5557 }
5658 } ) ;
57- const testNotification : any = new MockNotification ( testConfig ) ;
59+ const testNotification : MockNotification = new MockNotification ( testConfig ) ;
5860 const expectedKeyframes : NotifierAnimationPresetKeyframes = {
5961 from : {
6062 transform : `translate3d( calc( 100% + ${ testConfig . position . horizontal . distance } px + 10px ), 0, 0 )`
@@ -63,7 +65,9 @@ export function main(): void {
6365 transform : 'translate3d( 0, 0, 0 )'
6466 }
6567 } ;
66- const keyframes : NotifierAnimationPresetKeyframes = slide . show ( testNotification ) ;
68+ // tslint:disable no-any
69+ const keyframes : NotifierAnimationPresetKeyframes = slide . show ( < any > testNotification ) ;
70+ // tslint:enable no-any
6771
6872 expect ( keyframes ) . toEqual ( expectedKeyframes ) ;
6973
@@ -83,7 +87,7 @@ export function main(): void {
8387 }
8488 }
8589 } ) ;
86- const testNotification : any = new MockNotification ( testConfig ) ;
90+ const testNotification : MockNotification = new MockNotification ( testConfig ) ;
8791 const expectedKeyframes : NotifierAnimationPresetKeyframes = {
8892 from : {
8993 transform : `translate3d( -50%, calc( -100% - ${ testConfig . position . horizontal . distance } px - 10px ), 0 )`
@@ -92,7 +96,9 @@ export function main(): void {
9296 transform : 'translate3d( -50%, 0, 0 )'
9397 }
9498 } ;
95- const keyframes : NotifierAnimationPresetKeyframes = slide . show ( testNotification ) ;
99+ // tslint:disable no-any
100+ const keyframes : NotifierAnimationPresetKeyframes = slide . show ( < any > testNotification ) ;
101+ // tslint:enable no-any
96102
97103 expect ( keyframes ) . toEqual ( expectedKeyframes ) ;
98104
@@ -112,7 +118,7 @@ export function main(): void {
112118 }
113119 }
114120 } ) ;
115- const testNotification : any = new MockNotification ( testConfig ) ;
121+ const testNotification : MockNotification = new MockNotification ( testConfig ) ;
116122 const expectedKeyframes : NotifierAnimationPresetKeyframes = {
117123 from : {
118124 transform : `translate3d( -50%, calc( 100% + ${ testConfig . position . horizontal . distance } px + 10px ), 0 )`
@@ -121,7 +127,9 @@ export function main(): void {
121127 transform : 'translate3d( -50%, 0, 0 )'
122128 }
123129 } ;
124- const keyframes : NotifierAnimationPresetKeyframes = slide . show ( testNotification ) ;
130+ // tslint:disable no-any
131+ const keyframes : NotifierAnimationPresetKeyframes = slide . show ( < any > testNotification ) ;
132+ // tslint:enable no-any
125133
126134 expect ( keyframes ) . toEqual ( expectedKeyframes ) ;
127135
@@ -144,7 +152,7 @@ export function main(): void {
144152 }
145153 }
146154 } ) ;
147- const testNotification : any = new MockNotification ( testConfig ) ;
155+ const testNotification : MockNotification = new MockNotification ( testConfig ) ;
148156 const expectedKeyframes : NotifierAnimationPresetKeyframes = {
149157 from : {
150158 transform : `translate3d( 0, ${ testNotification . component . getShift ( ) } px, 0 )`
@@ -155,7 +163,9 @@ export function main(): void {
155163 /* tslint:enable max-line-length */
156164 }
157165 } ;
158- const keyframes : NotifierAnimationPresetKeyframes = slide . hide ( testNotification ) ;
166+ // tslint:disable no-any
167+ const keyframes : NotifierAnimationPresetKeyframes = slide . hide ( < any > testNotification ) ;
168+ // tslint:enable no-any
159169
160170 expect ( keyframes ) . toEqual ( expectedKeyframes ) ;
161171
@@ -174,7 +184,7 @@ export function main(): void {
174184 }
175185 }
176186 } ) ;
177- const testNotification : any = new MockNotification ( testConfig ) ;
187+ const testNotification : MockNotification = new MockNotification ( testConfig ) ;
178188 const expectedKeyframes : NotifierAnimationPresetKeyframes = {
179189 from : {
180190 transform : `translate3d( 0, ${ testNotification . component . getShift ( ) } px, 0 )`
@@ -185,7 +195,9 @@ export function main(): void {
185195 /* tslint:enable max-line-length */
186196 }
187197 } ;
188- const keyframes : NotifierAnimationPresetKeyframes = slide . hide ( testNotification ) ;
198+ // tslint:disable no-any
199+ const keyframes : NotifierAnimationPresetKeyframes = slide . hide ( < any > testNotification ) ;
200+ // tslint:enable no-any
189201
190202 expect ( keyframes ) . toEqual ( expectedKeyframes ) ;
191203
@@ -204,7 +216,7 @@ export function main(): void {
204216 }
205217 }
206218 } ) ;
207- const testNotification : any = new MockNotification ( testConfig ) ;
219+ const testNotification : MockNotification = new MockNotification ( testConfig ) ;
208220 const expectedKeyframes : NotifierAnimationPresetKeyframes = {
209221 from : {
210222 transform : `translate3d( -50%, ${ testNotification . component . getShift ( ) } px, 0 )`
@@ -213,7 +225,9 @@ export function main(): void {
213225 transform : `translate3d( -50%, calc( -100% - ${ testConfig . position . horizontal . distance } px - 10px ), 0 )`
214226 }
215227 } ;
216- const keyframes : NotifierAnimationPresetKeyframes = slide . hide ( testNotification ) ;
228+ // tslint:disable no-any
229+ const keyframes : NotifierAnimationPresetKeyframes = slide . hide ( < any > testNotification ) ;
230+ // tslint:enable no-any
217231
218232 expect ( keyframes ) . toEqual ( expectedKeyframes ) ;
219233
@@ -232,7 +246,7 @@ export function main(): void {
232246 }
233247 }
234248 } ) ;
235- const testNotification : any = new MockNotification ( testConfig ) ;
249+ const testNotification : MockNotification = new MockNotification ( testConfig ) ;
236250 const expectedKeyframes : NotifierAnimationPresetKeyframes = {
237251 from : {
238252 transform : `translate3d( -50%, ${ testNotification . component . getShift ( ) } px, 0 )`
@@ -241,7 +255,9 @@ export function main(): void {
241255 transform : `translate3d( -50%, calc( 100% + ${ testConfig . position . horizontal . distance } px + 10px ), 0 )`
242256 }
243257 } ;
244- const keyframes : NotifierAnimationPresetKeyframes = slide . hide ( testNotification ) ;
258+ // tslint:disable no-any
259+ const keyframes : NotifierAnimationPresetKeyframes = slide . hide ( < any > testNotification ) ;
260+ // tslint:enable no-any
245261
246262 expect ( keyframes ) . toEqual ( expectedKeyframes ) ;
247263
@@ -253,6 +269,21 @@ export function main(): void {
253269
254270}
255271
272+ /**
273+ * Mock Notification Height
274+ */
275+ const mockNotificationHeight : number = 40 ;
276+
277+ /**
278+ * Mock Notification Shift
279+ */
280+ const mockNotificationShift : number = 80 ;
281+
282+ /**
283+ * Mock Notification Width
284+ */
285+ const mockNotificationWidth : number = 300 ;
286+
256287/**
257288 * Mock notification, providing static values except the global configuration
258289 */
@@ -261,7 +292,7 @@ class MockNotification {
261292 /**
262293 * Configuration
263294 */
264- public config : any ;
295+ public config : NotifierConfig ;
265296
266297 /**
267298 * Notification ID
@@ -278,22 +309,24 @@ class MockNotification {
278309 */
279310 public message : string = 'Lorem ipsum dolor sit amet.' ;
280311
312+ // tslint:disable no-any
281313 /**
282314 * Notification component
283315 */
284316 public component : any = {
285317 getConfig : ( ) => this . config ,
286- getHeight : ( ) => 40 ,
287- getShift : ( ) => 80 ,
288- getWidth : ( ) => 300
318+ getHeight : ( ) => mockNotificationHeight ,
319+ getShift : ( ) => mockNotificationShift ,
320+ getWidth : ( ) => mockNotificationWidth
289321 } ;
322+ // tslint:enable no-any
290323
291324 /**
292325 * Constructor
293326 *
294- * @param {any } config Configuration
327+ * @param {NotifierConfig } config Configuration
295328 */
296- public constructor ( config : any ) {
329+ public constructor ( config : NotifierConfig ) {
297330 this . config = config ;
298331 }
299332
0 commit comments