PR-URL: https://github.com/nodejs/node/pull/55698 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
13 lines
512 B
JavaScript
13 lines
512 B
JavaScript
'use strict';
|
|
// Flags: --no-experimental-strip-types --no-experimental-transform-types
|
|
// This tests that a mini TypeScript loader works with resolve and
|
|
// load hooks when TypeScript support is disabled.
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
// Test inline require().
|
|
require('../fixtures/module-hooks/register-typescript-hooks.js');
|
|
const { UserAccount, UserType } = require('../fixtures/module-hooks/user.ts');
|
|
assert.strictEqual((new UserAccount('foo', 1, UserType.Admin).name), 'foo');
|