mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Use create* prefix to clarify curried functions
This commit is contained in:
+12
-10
@@ -24,10 +24,10 @@ exports.ensureDirectory = async (userDataPath) => {
|
||||
await fse.ensureDir(exports.getPath(userDataPath));
|
||||
};
|
||||
|
||||
// readData :: AttachmentsPath ->
|
||||
// RelativePath ->
|
||||
// IO (Promise ArrayBuffer)
|
||||
exports.readData = (root) => {
|
||||
// createReader :: AttachmentsPath ->
|
||||
// RelativePath ->
|
||||
// IO (Promise ArrayBuffer)
|
||||
exports.createReader = (root) => {
|
||||
if (!isString(root)) {
|
||||
throw new TypeError('`root` must be a path');
|
||||
}
|
||||
@@ -43,10 +43,10 @@ exports.readData = (root) => {
|
||||
};
|
||||
};
|
||||
|
||||
// writeData :: AttachmentsPath ->
|
||||
// ArrayBuffer ->
|
||||
// IO (Promise RelativePath)
|
||||
exports.writeData = (root) => {
|
||||
// createWriter :: AttachmentsPath ->
|
||||
// ArrayBuffer ->
|
||||
// IO (Promise RelativePath)
|
||||
exports.createWriter = (root) => {
|
||||
if (!isString(root)) {
|
||||
throw new TypeError('`root` must be a path');
|
||||
}
|
||||
@@ -66,8 +66,10 @@ exports.writeData = (root) => {
|
||||
};
|
||||
};
|
||||
|
||||
// deleteData :: AttachmentsPath -> IO Unit
|
||||
exports.deleteData = (root) => {
|
||||
// createDeleter :: AttachmentsPath ->
|
||||
// RelativePath ->
|
||||
// IO Unit
|
||||
exports.createDeleter = (root) => {
|
||||
if (!isString(root)) {
|
||||
throw new TypeError('`root` must be a path');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user