diff --git a/src/core/util/props.js b/src/core/util/props.js index 1b57f77cdb5..f8d25902f7d 100644 --- a/src/core/util/props.js +++ b/src/core/util/props.js @@ -146,7 +146,7 @@ function assertProp ( } } -const simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/ +const simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/ function assertType (value: any, type: Function): { valid: boolean; diff --git a/test/unit/features/options/props.spec.js b/test/unit/features/options/props.spec.js index 5adedeb2e6e..f42451e4bad 100644 --- a/test/unit/features/options/props.spec.js +++ b/test/unit/features/options/props.spec.js @@ -242,6 +242,16 @@ describe('Options props', () => { expect('Expected Symbol, got Object').toHaveBeenWarned() }) } + + if (typeof BigInt !== 'undefined') { + /* global BigInt */ + it('bigint', () => { + makeInstance(BigInt(100), BigInt) + expect(console.error.calls.count()).toBe(0) + makeInstance({}, BigInt) + expect('Expected BigInt, got Object').toHaveBeenWarned() + }) + } it('custom constructor', () => { function Class () {}