-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
we now have better cache invalidation. We can also query the parent f…
…or non file system changes closes #130
- Loading branch information
Showing
10 changed files
with
76 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
var resolve = Promise.resolve.bind(Promise); | ||
var atomUtils = require('../main/atom/atomUtils'); | ||
function echoNumWithModification(query) { | ||
return Promise.resolve({ num: query.num + 10 }); | ||
} | ||
exports.echoNumWithModification = echoNumWithModification; | ||
function getUpdatedTextForUnsavedEditors(query) { | ||
var editors = atomUtils.getTypeScriptEditorsWithPaths().filter(function (editor) { return editor.isModified(); }); | ||
return resolve({ | ||
editors: editors.map(function (e) { | ||
return { filePath: e.getPath(), text: e.getText() }; | ||
}) | ||
}); | ||
} | ||
exports.getUpdatedTextForUnsavedEditors = getUpdatedTextForUnsavedEditors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
/// Functions that the parent allows the child to query | ||
|
||
var resolve: typeof Promise.resolve = Promise.resolve.bind(Promise); | ||
|
||
///ts:import=atomUtils | ||
import atomUtils = require('../main/atom/atomUtils'); ///ts:import:generated | ||
|
||
export function echoNumWithModification(query: { num: number }): Promise<{ num: number }> { | ||
return Promise.resolve({ num: query.num + 10 }); | ||
} | ||
|
||
export function getUpdatedTextForUnsavedEditors(query: {}): Promise<{ editors: { filePath: string; text: string }[] }> { | ||
var editors = atomUtils.getTypeScriptEditorsWithPaths().filter(editor => editor.isModified()); | ||
return resolve({ | ||
editors: editors.map(e=> { | ||
return { filePath: e.getPath(), text: e.getText() } | ||
}) | ||
}); | ||
} |