Skip to content

Commit

Permalink
Consider to change RelativePattern ctor argument order (fixes #35103)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Sep 26, 2017
1 parent 14b519c commit fd19798
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1682,11 +1682,11 @@ declare module 'vscode' {
/**
* Creates a new relative pattern object with provided base path and pattern to match.
*
* @param base A base file path to which the pattern will be matched against relatively.
* @param pattern A file glob pattern like `*.{ts,js}` that will be matched on file paths
* relative to the base path.
* @param base A base file path to which the pattern will be matched against relatively.
*/
constructor(pattern: string, base: WorkspaceFolder | string)
constructor(base: WorkspaceFolder | string, pattern: string)
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/api/node/extHostTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1451,8 +1451,8 @@ export class RelativePattern implements IRelativePattern {
base: string;
pattern: string;

constructor(pattern: string, base: vscode.WorkspaceFolder | string) {
this.pattern = pattern;
constructor(base: vscode.WorkspaceFolder | string, pattern: string) {
this.base = typeof base === 'string' ? base : base.uri.fsPath;
this.pattern = pattern;
}
}

0 comments on commit fd19798

Please sign in to comment.