Add xdg-basedir

Summary:
Split this up into a separate review because the file is actually
sorta hand-written and just adds noise to the things I was
actually doing.

Reviewed By: jknoxville

Differential Revision: D16441548

fbshipit-source-id: 93366d38908bbec347fd837f5dc90b11329ebf8e
This commit is contained in:
Pascal Hartig
2019-07-24 02:17:51 -07:00
committed by Facebook Github Bot
parent f7875002dd
commit 3760e260d6
3 changed files with 99 additions and 0 deletions

93
flow-typed/npm/xdg-basedir_vx.x.x.js vendored Normal file
View File

@@ -0,0 +1,93 @@
// flow-typed signature: aeca92eaf2f43c625d3be06eb8dc2bc7
// flow-typed version: <<STUB>>/xdg-basedir_v4.0.0/flow_v0.102.0
/**
* This is an autogenerated libdef stub for:
*
* 'xdg-basedir'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'xdg-basedir' {
declare module.exports: {
/**
* Directory for user-specific data files.
* @example ```js
* import xdgBasedir = require('xdg-basedir');
* xdgBasedir.data;
* //=> '/home/sindresorhus/.local/share'
* ```
*/
+data?: string,
/**
* Directory for user-specific configuration files.
* @example ```js
* import xdgBasedir = require('xdg-basedir');
* xdgBasedir.config;
* //=> '/home/sindresorhus/.config'
* ```
*/
+config?: string,
/**
* Directory for user-specific non-essential data files.
* @example ```js
* import xdgBasedir = require('xdg-basedir');
* xdgBasedir.cache;
* //=> '/home/sindresorhus/.cache'
* ```
*/
+cache?: string,
/**
* Directory for user-specific non-essential runtime files and other file objects (such as sockets, named pipes, etc).
* @example ```js
* import xdgBasedir = require('xdg-basedir');
* xdgBasedir.runtime;
* //=> '/run/user/sindresorhus'
* ```
*/
+runtime?: string,
/**
* Preference-ordered array of base directories to search for data files in addition to `.data`.
* @example ```js
* import xdgBasedir = require('xdg-basedir');
* xdgBasedir.dataDirs
* //=> ['/home/sindresorhus/.local/share', '/usr/local/share/', '/usr/share/']
* ```
*/
+dataDirs: [string],
/**
* Preference-ordered array of base directories to search for configuration files in addition to `.config`.
* @example ```js
* import xdgBasedir = require('xdg-basedir');
* xdgBasedir.configDirs;
* //=> ['/home/sindresorhus/.config', '/etc/xdg']
* ```
*/
+configDirs: [string],
}
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'xdg-basedir/index' {
declare module.exports: $Exports<'xdg-basedir'>;
}
declare module 'xdg-basedir/index.js' {
declare module.exports: $Exports<'xdg-basedir'>;
}