mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
Use is
syntax (#4079)
This commit is contained in:
parent
c2ace79469
commit
3604b99943
@ -1,3 +1,5 @@
|
|||||||
export default function(x: any): boolean {
|
import { ObjectID } from 'mongodb';
|
||||||
|
|
||||||
|
export default function(x: any): x is ObjectID {
|
||||||
return x.hasOwnProperty('toHexString') || x.hasOwnProperty('_bsontype');
|
return x.hasOwnProperty('toHexString') || x.hasOwnProperty('_bsontype');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user