pnpTs.js 853 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // @remove-on-eject-begin
  2. /**
  3. * Copyright (c) 2015-present, Facebook, Inc.
  4. *
  5. * This source code is licensed under the MIT license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. // @remove-on-eject-end
  9. 'use strict';
  10. const { resolveModuleName } = require('ts-pnp');
  11. exports.resolveModuleName = (
  12. typescript,
  13. moduleName,
  14. containingFile,
  15. compilerOptions,
  16. resolutionHost
  17. ) => {
  18. return resolveModuleName(
  19. moduleName,
  20. containingFile,
  21. compilerOptions,
  22. resolutionHost,
  23. typescript.resolveModuleName
  24. );
  25. };
  26. exports.resolveTypeReferenceDirective = (
  27. typescript,
  28. moduleName,
  29. containingFile,
  30. compilerOptions,
  31. resolutionHost
  32. ) => {
  33. return resolveModuleName(
  34. moduleName,
  35. containingFile,
  36. compilerOptions,
  37. resolutionHost,
  38. typescript.resolveTypeReferenceDirective
  39. );
  40. };