-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Component commits: bd2fd3b Only filter ignored paths from module specifier generation if there exists a better option a687bae Nit 7597f52 Merge branch 'master' into bug/42785 Co-authored-by: Andrew Branch <[email protected]>
- Loading branch information
1 parent
d971013
commit 7b14d41
Showing
5 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/baselines/reference/nodeModuleReexportFromDottedPath.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// | ||
|
||
//// [index.d.ts] | ||
export interface PrismaClientOptions { | ||
rejectOnNotFound?: any; | ||
} | ||
|
||
export class PrismaClient<T extends PrismaClientOptions = PrismaClientOptions> { | ||
private fetcher; | ||
} | ||
|
||
//// [index.d.ts] | ||
export * from ".prisma/client"; | ||
|
||
//// [index.ts] | ||
import { PrismaClient } from "@prisma/client"; | ||
declare const enhancePrisma: <TPrismaClientCtor>(client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; | ||
const EnhancedPrisma = enhancePrisma(PrismaClient); | ||
export default new EnhancedPrisma(); | ||
|
||
|
||
//// [index.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
var client_1 = require("@prisma/client"); | ||
var EnhancedPrisma = enhancePrisma(client_1.PrismaClient); | ||
exports["default"] = new EnhancedPrisma(); | ||
|
||
|
||
//// [index.d.ts] | ||
import { PrismaClient } from "@prisma/client"; | ||
declare const _default: PrismaClient<import(".prisma/client").PrismaClientOptions>; | ||
export default _default; |
41 changes: 41 additions & 0 deletions
41
tests/baselines/reference/nodeModuleReexportFromDottedPath.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
=== /node_modules/.prisma/client/index.d.ts === | ||
export interface PrismaClientOptions { | ||
>PrismaClientOptions : Symbol(PrismaClientOptions, Decl(index.d.ts, 0, 0)) | ||
|
||
rejectOnNotFound?: any; | ||
>rejectOnNotFound : Symbol(PrismaClientOptions.rejectOnNotFound, Decl(index.d.ts, 0, 38)) | ||
} | ||
|
||
export class PrismaClient<T extends PrismaClientOptions = PrismaClientOptions> { | ||
>PrismaClient : Symbol(PrismaClient, Decl(index.d.ts, 2, 1)) | ||
>T : Symbol(T, Decl(index.d.ts, 4, 26)) | ||
>PrismaClientOptions : Symbol(PrismaClientOptions, Decl(index.d.ts, 0, 0)) | ||
>PrismaClientOptions : Symbol(PrismaClientOptions, Decl(index.d.ts, 0, 0)) | ||
|
||
private fetcher; | ||
>fetcher : Symbol(PrismaClient.fetcher, Decl(index.d.ts, 4, 80)) | ||
} | ||
|
||
=== /node_modules/@prisma/client/index.d.ts === | ||
export * from ".prisma/client"; | ||
No type information for this code. | ||
No type information for this code.=== /index.ts === | ||
import { PrismaClient } from "@prisma/client"; | ||
>PrismaClient : Symbol(PrismaClient, Decl(index.ts, 0, 8)) | ||
|
||
declare const enhancePrisma: <TPrismaClientCtor>(client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; | ||
>enhancePrisma : Symbol(enhancePrisma, Decl(index.ts, 1, 13)) | ||
>TPrismaClientCtor : Symbol(TPrismaClientCtor, Decl(index.ts, 1, 30)) | ||
>client : Symbol(client, Decl(index.ts, 1, 49)) | ||
>TPrismaClientCtor : Symbol(TPrismaClientCtor, Decl(index.ts, 1, 30)) | ||
>TPrismaClientCtor : Symbol(TPrismaClientCtor, Decl(index.ts, 1, 30)) | ||
>enhanced : Symbol(enhanced, Decl(index.ts, 1, 100)) | ||
|
||
const EnhancedPrisma = enhancePrisma(PrismaClient); | ||
>EnhancedPrisma : Symbol(EnhancedPrisma, Decl(index.ts, 2, 5)) | ||
>enhancePrisma : Symbol(enhancePrisma, Decl(index.ts, 1, 13)) | ||
>PrismaClient : Symbol(PrismaClient, Decl(index.ts, 0, 8)) | ||
|
||
export default new EnhancedPrisma(); | ||
>EnhancedPrisma : Symbol(EnhancedPrisma, Decl(index.ts, 2, 5)) | ||
|
35 changes: 35 additions & 0 deletions
35
tests/baselines/reference/nodeModuleReexportFromDottedPath.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
=== /node_modules/.prisma/client/index.d.ts === | ||
export interface PrismaClientOptions { | ||
rejectOnNotFound?: any; | ||
>rejectOnNotFound : any | ||
} | ||
|
||
export class PrismaClient<T extends PrismaClientOptions = PrismaClientOptions> { | ||
>PrismaClient : PrismaClient<T> | ||
|
||
private fetcher; | ||
>fetcher : any | ||
} | ||
|
||
=== /node_modules/@prisma/client/index.d.ts === | ||
export * from ".prisma/client"; | ||
No type information for this code. | ||
No type information for this code.=== /index.ts === | ||
import { PrismaClient } from "@prisma/client"; | ||
>PrismaClient : typeof PrismaClient | ||
|
||
declare const enhancePrisma: <TPrismaClientCtor>(client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; | ||
>enhancePrisma : <TPrismaClientCtor>(client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown; } | ||
>client : TPrismaClientCtor | ||
>enhanced : unknown | ||
|
||
const EnhancedPrisma = enhancePrisma(PrismaClient); | ||
>EnhancedPrisma : typeof PrismaClient & { enhanced: unknown; } | ||
>enhancePrisma(PrismaClient) : typeof PrismaClient & { enhanced: unknown; } | ||
>enhancePrisma : <TPrismaClientCtor>(client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown; } | ||
>PrismaClient : typeof PrismaClient | ||
|
||
export default new EnhancedPrisma(); | ||
>new EnhancedPrisma() : PrismaClient<import("/node_modules/.prisma/client/index").PrismaClientOptions> | ||
>EnhancedPrisma : typeof PrismaClient & { enhanced: unknown; } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @declaration: true | ||
|
||
// @Filename: /node_modules/.prisma/client/index.d.ts | ||
export interface PrismaClientOptions { | ||
rejectOnNotFound?: any; | ||
} | ||
|
||
export class PrismaClient<T extends PrismaClientOptions = PrismaClientOptions> { | ||
private fetcher; | ||
} | ||
|
||
// @Filename: /node_modules/@prisma/client/index.d.ts | ||
export * from ".prisma/client"; | ||
|
||
// @Filename: /index.ts | ||
import { PrismaClient } from "@prisma/client"; | ||
declare const enhancePrisma: <TPrismaClientCtor>(client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; | ||
const EnhancedPrisma = enhancePrisma(PrismaClient); | ||
export default new EnhancedPrisma(); |