File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1212
1313## master
1414
15+ #### :rocket : New Feature
16+
17+ - If interface file exists, ask if it should be overwritten. https://github.com/rescript-lang/rescript-vscode/pull/865
18+
1519#### :bug : Bug Fix
1620
1721- Treat ` result ` type as a proper built in type. https://github.com/rescript-lang/rescript-vscode/pull/860
Original file line number Diff line number Diff line change @@ -21,7 +21,19 @@ export const createInterface = (client: LanguageClient) => {
2121 }
2222
2323 if ( fs . existsSync ( editor . document . uri . fsPath + "i" ) ) {
24- return window . showInformationMessage ( "Interface file already exists" ) ;
24+ return window
25+ . showInformationMessage (
26+ "Interface file already exists. Do you want to overwrite it?" ,
27+ "Yes" ,
28+ "No"
29+ )
30+ . then ( ( answer ) => {
31+ if ( answer === "Yes" ) {
32+ client . sendRequest ( createInterfaceRequest , {
33+ uri : editor . document . uri . toString ( ) ,
34+ } ) ;
35+ }
36+ } ) ;
2537 }
2638
2739 client . sendRequest ( createInterfaceRequest , {
You can’t perform that action at this time.
0 commit comments