main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
298 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var test = {
|
---|
| 4 | __proto__: null,
|
---|
| 5 | foo: {}
|
---|
| 6 | };
|
---|
| 7 |
|
---|
[79a0317] | 8 | // @ts-expect-error: TS errors on an inherited property for some reason
|
---|
| 9 | var result = { __proto__: test }.foo === test.foo
|
---|
| 10 | && !(test instanceof Object);
|
---|
[d565449] | 11 |
|
---|
| 12 | /** @type {import('.')} */
|
---|
| 13 | module.exports = function hasProto() {
|
---|
[79a0317] | 14 | return result;
|
---|
[d565449] | 15 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.