René's URL Explorer Experiment


Title: Importing files other than TS modules · Issue #2709 · microsoft/TypeScript · GitHub

Open Graph Title: Importing files other than TS modules · Issue #2709 · microsoft/TypeScript

X Title: Importing files other than TS modules · Issue #2709 · microsoft/TypeScript

Description: I've successfully been using SystemJS and TypeScript for a while now. I've been about to use the CommonJS syntax to easily import other TS modules, as well as other resources: var OtherModule = require("./othermodule"); var Html =

Open Graph Description: I've successfully been using SystemJS and TypeScript for a while now. I've been about to use the CommonJS syntax to easily import other TS modules, as well as other resources: var OtherModule = req...

X Description: I've successfully been using SystemJS and TypeScript for a while now. I've been about to use the CommonJS syntax to easily import other TS modules, as well as other resources: var OtherModu...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/2709

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Importing files other than TS modules","articleBody":"I've successfully been using SystemJS and TypeScript for a while now. I've been about to use the CommonJS syntax to easily import other TS modules, as well as other resources:\n\n```\nvar OtherModule = require(\"./othermodule\");\nvar Html = \u003cstring>require(\"./template.html!text\");\nrequire(\"./template.css!\");\n```\n\nThis is made possible by simply declaring the following function:\n\n```\ndeclare function require(name: string): any;\n```\n\nI'm now trying to do the same with the new ES6 syntax:\n\n```\nimport { OtherModule } from \"./othermodule\";   // Works\nimport \"./template.css!\"; // Works\nimport Html from require(\"./template.html!text\"); // Nope - 'Cannot find external module'\n```\n\nOf course I can do the same as before and declare and use 'require', but it'd be nice to keep it consistent. Perhaps assume that if an exclamation mark is in the path, then don't assume it's a TypeScript import?\n","author":{"url":"https://github.com/jamiewinder","@type":"Person","name":"jamiewinder"},"datePublished":"2015-04-10T11:12:30Z","url":"https://github.com/microsoft/TypeScript/issues/2709"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:870d6ece-833a-0a5b-3fa1-b9b919dfe220
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9678:10AA8F:259155:33882D:6AFBB146
html-safe-nonceac5814cee32db3b834d2fceeec66957e72333268a8dd780845e0770df6a09f93
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Njc4OjEwQUE4RjoyNTkxNTU6MzM4ODJEOjZBRkJCMTQ2IiwidmlzaXRvcl9pZCI6IjQwMTg3Mzk0OTU1MTQ2NDg5MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac28412bc0cd7fc6509721d32a5e6f62153a1260e6f7ac52dd9ce0c2c452ee1fa2
hovercard-subject-tagissue:67570753
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/2709/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ffe35e438565db6b0453b82eda7ada3698afb4bc93b7655663bbcf04fb461827/microsoft/TypeScript/issues/2709
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ffe35e438565db6b0453b82eda7ada3698afb4bc93b7655663bbcf04fb461827/microsoft/TypeScript/issues/2709
og:image:altI've successfully been using SystemJS and TypeScript for a while now. I've been about to use the CommonJS syntax to easily import other TS modules, as well as other resources: var OtherModule = req...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejamiewinder
hostnamegithub.com
expected-hostnamegithub.com
Nonee25fbd830d3e6ad0e8935c105cf4fdc70c593dffcd27bb45b790ae4fece5ea55
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release08c8f17f9d27054a108b8b6254e405de0151f660
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/2709#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F2709
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F2709
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/2709
Reloadhttps://github.com/microsoft/TypeScript/issues/2709
Reloadhttps://github.com/microsoft/TypeScript/issues/2709
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests334 (334)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/pulse
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/2709
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/2709
Importing files other than TS moduleshttps://github.com/microsoft/TypeScript/issues/2709#top
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com/jamiewinder
Jamie Winder (jamiewinder)https://github.com/jamiewinder
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2709#issue-67570753
Nexthttps://github.com/microsoft/TypeScript/issues/2709?timeline_page=1
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-91627437
https://github.com/dfaivre
David Faivre (dfaivre)https://github.com/dfaivre
on Apr 11, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-91835842
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 12, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-91968950
https://github.com/dfaivre
David Faivre (dfaivre)https://github.com/dfaivre
on Apr 12, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-92078167
Dan Quirk (danquirk)https://github.com/danquirk
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
on Apr 13, 2015https://github.com/microsoft/TypeScript/issues/2709#event-280037209
https://github.com/MicahZoltu
Micah Zoltu (MicahZoltu)https://github.com/MicahZoltu
on May 4, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-98593347
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on May 4, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-98825232
Zoltu (@Zoltu)https://github.com/Zoltu
#3019 (comment)https://github.com/microsoft/TypeScript/issues/3019#issuecomment-98821868
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on May 4, 2015https://github.com/microsoft/TypeScript/issues/2709#event-296671816
https://github.com/jonrimmer
Jon Rimmer (jonrimmer)https://github.com/jonrimmer
on May 4, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-98869309
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on May 5, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-98889011
Jon Rimmer (@jonrimmer)https://github.com/jonrimmer
#2916https://github.com/microsoft/TypeScript/issues/2916
https://github.com/jonrimmer
Jon Rimmer (jonrimmer)https://github.com/jonrimmer
on May 5, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-98897853
Dan Quirk (@danquirk)https://github.com/danquirk
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
Angular 2 documentationhttps://angular.io/docs/js/latest/guide/setup.html
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on May 5, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-98901575
#2916https://github.com/microsoft/TypeScript/issues/2916
https://github.com/dfaivre
David Faivre (dfaivre)https://github.com/dfaivre
on May 5, 2015https://github.com/microsoft/TypeScript/issues/2709#issuecomment-99065955
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Proposal%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on May 19, 2015https://github.com/microsoft/TypeScript/issues/2709#event-308647469
https://github.com/pselden
Paul Selden (pselden)https://github.com/pselden
on Feb 3, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-277282128
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Feb 3, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-277308341
https://github.com/bomzj
Maksim Shamihulau (bomzj)https://github.com/bomzj
on Mar 20, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-287778043
https://github.com/empz
Emiliano Parizzi (empz)https://github.com/empz
on Mar 20, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-287823178
Maksim Shamihulau (@bomzj)https://github.com/bomzj
https://github.com/fiznool
Tom Spencer (fiznool)https://github.com/fiznool
on Mar 29, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-290069826
https://github.com/aluanhaddad
Aluan Haddad (aluanhaddad)https://github.com/aluanhaddad
on Mar 29, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-290086942
https://github.com/fiznool
Tom Spencer (fiznool)https://github.com/fiznool
on Mar 29, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-290105753
Aluan Haddad (@aluanhaddad)https://github.com/aluanhaddad
https://github.com/aluanhaddad
Aluan Haddad (aluanhaddad)https://github.com/aluanhaddad
on Mar 30, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-290397484
https://github.com/avindra
Avindra Goolcharan (avindra)https://github.com/avindra
on Apr 16, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-294366112
https://github.com/kitsonk
Kitson Kelly (kitsonk)https://github.com/kitsonk
on Apr 17, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-294411411
https://github.com/lokeshdaiya
Lokesh daiya (lokeshdaiya)https://github.com/lokeshdaiya
on Jun 23, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-310570796
Avindra Goolcharan (@avindra)https://github.com/avindra
Kitson Kelly (@kitsonk)https://github.com/kitsonk
https://github.com/Izhaki
Izhakihttps://github.com/Izhaki
on Jul 11, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-314483051
https://github.com/quantuminformation
Nikos (quantuminformation)https://github.com/quantuminformation
on Dec 11, 2017https://github.com/microsoft/TypeScript/issues/2709#issuecomment-350733874
https://github.com/Retsam
Retsamhttps://github.com/Retsam
on Mar 8, 2018https://github.com/microsoft/TypeScript/issues/2709#issuecomment-371657861
Nikos (@quantuminformation)https://github.com/quantuminformation
microsofthttps://github.com/microsoft
on Jul 18, 2018https://github.com/microsoft/TypeScript/issues/2709#event-1740834051
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/2709
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/2709
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.