mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
13 lines
300 B
JavaScript
13 lines
300 B
JavaScript
|
const util = require('util');
|
||
|
const assert = require('assert');
|
||
|
|
||
|
class deprecatedClass {
|
||
|
}
|
||
|
|
||
|
const deprecated = util.deprecate(deprecatedClass, 'deprecatedClass is deprecated.');
|
||
|
|
||
|
const instance = new deprecated();
|
||
|
|
||
|
assert(instance instanceof deprecated);
|
||
|
assert(instance instanceof deprecatedClass);
|