Skip to content

[Playground] two slash @filename not work in typescript playground #52666

Closed as not planned
@magic-akari

Description

@magic-akari

Bug Report

🔎 Search Terms

  • playground
  • two slash
  • filename

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions ______ and _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

Playground link with relevant code

💻 Code

Code from https://github.com/microsoft/TypeScript-Website/tree/v2/packages/ts-twoslasher#import_filests

// @filename: file-with-export.ts
export const helloWorld = "Example string"

// @filename: index.ts
import { helloWorld } from "./file-with-export"
console.log(helloWorld)

🙁 Actual behavior

TS2307: Cannot find module './file-with-export' or its corresponding type declarations.

🙂 Expected behavior

It works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions