File tree 3 files changed +13
-8
lines changed
3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1
1
import type { Placement } from '@popperjs/core'
2
2
import type { Placements } from '../../types'
3
- import type { Alignments } from './types'
3
+ import type { Alignments , Breakpoints } from './types'
4
4
5
- export const getAlignmentClassNames = ( alignment : object | string ) => {
5
+ export const getAlignmentClassNames = ( alignment : Alignments ) => {
6
6
const classNames : string [ ] = [ ]
7
7
if ( typeof alignment === 'object' ) {
8
- Object . keys ( alignment ) . map ( ( key ) => {
9
- classNames . push ( `dropdown-menu${ key === 'xs' ? '' : `-${ key } ` } -${ alignment [ key ] } ` )
10
- } )
8
+ for ( const key in alignment ) {
9
+ classNames . push (
10
+ `dropdown-menu${ key === 'xs' ? '' : `-${ key } ` } -${ alignment [ key as keyof Breakpoints ] } ` ,
11
+ )
12
+ }
11
13
}
12
14
13
15
if ( typeof alignment === 'string' ) {
Original file line number Diff line number Diff line change
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
import { App } from 'vue'
2
3
import * as Components from './components'
3
4
import * as Directives from './directives'
4
5
5
6
const CoreuiVue = {
6
7
install : ( app : App ) : void => {
7
8
for ( const key in Components ) {
8
- app . component ( key , Components [ key ] )
9
+ app . component ( key , ( Components as { [ key : string ] : any } ) [ key ] )
9
10
}
10
11
11
12
for ( const key in Directives ) {
12
- app . directive ( Directives [ key ] [ 'name' ] , Directives [ key ] )
13
+ app . directive (
14
+ ( Directives as { [ key : string ] : any } ) [ key ] [ 'name' ] ,
15
+ ( Directives as { [ key : string ] : any } ) [ key ] ,
16
+ )
13
17
}
14
18
} ,
15
19
}
Original file line number Diff line number Diff line change 15
15
"noImplicitThis" : true ,
16
16
"noImplicitAny" : true ,
17
17
"strictNullChecks" : true ,
18
- "suppressImplicitAnyIndexErrors" : true ,
19
18
"noUnusedLocals" : true ,
20
19
"noUnusedParameters" : true ,
21
20
"esModuleInterop" : true ,
You can’t perform that action at this time.
0 commit comments