Skip to content

Commit

Permalink
fix(typescript): remove incorrect file extensions (#20194)
Browse files Browse the repository at this point in the history
* fix(typescript): remove incorrect file extensions

url, http, and https are Node.js core modules, and form-data
should be loaded using a bare specifier. This commit removes
the file extensions from these imports.

* update samples
  • Loading branch information
cjihrig authored Dec 2, 2024
1 parent 1eaa75b commit 06f0b68
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{#platforms}}
{{#node}}
// TODO: evaluate if we can easily get rid of this library
import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data{{importFileExtension}}";
import { URL, URLSearchParams } from 'url{{importFileExtension}}';
import * as http from 'http{{importFileExtension}}';
import * as https from 'https{{importFileExtension}}';
import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data";
import { URL, URLSearchParams } from 'url';
import * as http from 'http';
import * as https from 'https';
{{/node}}
{{/platforms}}
import { Observable, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{importFileExtension}}'{{/useRxJS}};
Expand Down Expand Up @@ -169,7 +169,7 @@ export class RequestContext {
}
{{#platforms}}
{{#node}}

public setAgent(agent: http.Agent | https.Agent) {
this.agent = agent;
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 06f0b68

Please sign in to comment.