-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(v-expansion-panel): converted to typescript #4609
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4609 +/- ##
==========================================
- Coverage 90.17% 90.14% -0.03%
==========================================
Files 206 206
Lines 4914 4920 +6
Branches 1246 1249 +3
==========================================
+ Hits 4431 4435 +4
- Misses 387 389 +2
Partials 96 96
Continue to review full report at Codecov.
|
}, | ||
|
||
methods: { | ||
onKeydown (e) { | ||
onKeydown (e: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e
is a KeyboardEvent
@@ -69,7 +70,8 @@ test('VExpansionPanel.js', ({ mount, compileToFunctions }) => { | |||
expect(wrapper.first('.v-expansion-panel__container--active')).not.toBe(null) | |||
}) | |||
|
|||
it('should show content on mount using v-model', async () => { | |||
// TODO: Enable again when using vue-test-utils and https://github.com/vuejs/vue-test-utils/issues/824 is solved | |||
it.skip('should show content on mount using v-model', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does slots: { default: VExpansionPanelContent.options }
work here?
import Themeable from '../../mixins/themeable' | ||
import { provide as RegistrableProvide } from '../../mixins/registrable' | ||
|
||
import mixins from '../../util/mixins' | ||
import { VNode } from '../../../node_modules/vue' | ||
import { PropValidator } from '../../../node_modules/vue/types/options' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use absolute paths
@@ -25,16 +31,16 @@ export default { | |||
value: { | |||
type: [Number, Array], | |||
default: () => null | |||
} | |||
} as any as PropValidator<number | number[]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is any
needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw it being done in the code somewhere, and simply as PropValidator<number | number[]>
threw errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok that's fine then, just checking.
@@ -46,10 +52,10 @@ export default { | |||
|
|||
watch: { | |||
expand (val) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
annotate watch params, they're any
by default. (shit decision by vue)
import VExpansionPanel from '.' | ||
|
||
import mixins, { ExtractVue } from '../../util/mixins' | ||
import Vue, { VNode } from '../../../node_modules/vue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dammit. seems like it's the vscode 1.25 update that's causing it
Description
Converted v-expansion-panel to typescript. Had to disable two tests because of vuejs/vue-test-utils#824
Motivation and Context
because!
How Has This Been Tested?
visually, jest
Markup:
Types of changes
Checklist:
master
for bug fixes,dev
for new features and breaking changes).