Skip to content

Commit

Permalink
chore(release): 1.3.6
Browse files Browse the repository at this point in the history
## [1.3.6](v1.3.5...v1.3.6) (2022-04-25)

### Bug Fixes

* fix missing exports and type narrowing ([#18](#18)) ([5ec7115](5ec7115))
  • Loading branch information
semantic-release-bot committed Apr 25, 2022
1 parent 5ec7115 commit df530c6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.3.6](https://github.com/jaredLunde/exploration/compare/v1.3.5...v1.3.6) (2022-04-25)


### Bug Fixes

* fix missing exports and type narrowing ([#18](https://github.com/jaredLunde/exploration/issues/18)) ([5ec7115](https://github.com/jaredLunde/exploration/commit/5ec711523b87d453324df7ed541ac71efc4e9261))

## [1.3.5](https://github.com/jaredLunde/exploration/compare/v1.3.4...v1.3.5) (2022-04-25)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "exploration",
"version": "1.3.5",
"version": "1.3.6",
"description": "",
"license": "MIT",
"author": "Jared Lunde <[email protected]> (https://jaredlunde.com/)",
Expand Down
21 changes: 14 additions & 7 deletions types/file-tree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,21 @@ export declare class FileTree<Meta = {}> extends Tree<FileTreeData<Meta>> {
* @param inDir - The directory to create the file in
* @param withData - The data for the file
*/
newFile(inDir: Dir<Meta>, withData: FileTreeData<Meta>): void;
newFile(inDir: Dir<Meta>, withData: FileTreeData<Meta>): File<Meta>;
/**
* Create a new directory in a given directory.
*
* @param inDir - The directory to create the directory in
* @param withData - The data for the directory
* @param expanded - Whether the directory should be expanded by default
*/
newDir(inDir: Dir<Meta>, withData: FileTreeData<Meta>, expanded?: boolean): void;
newDir(inDir: Dir<Meta>, withData: FileTreeData<Meta>, expanded?: boolean): Dir<Meta>;
/**
* Create a new directory in a given directory.
*
* @param inDir - The directory to create the directory in
*/
newPrompt(inDir: Dir<Meta>): void;
newPrompt(inDir: Dir<Meta>): Prompt<Meta>;
/**
* Rename a node.
*
Expand All @@ -124,6 +124,7 @@ export declare class FileTree<Meta = {}> extends Tree<FileTreeData<Meta>> {
rename(node: File<Meta> | Dir<Meta>, newName: string): void;
}
export declare class File<Meta = {}> extends Leaf<FileTreeData<Meta>> {
readonly $$type = "file";
/**
* The parent directory of the file
*/
Expand All @@ -138,6 +139,7 @@ export declare class File<Meta = {}> extends Leaf<FileTreeData<Meta>> {
get path(): string;
}
export declare class Prompt<Meta = {}> extends Leaf<FileTreeData<Meta>> {
readonly $$type = "prompt";
/**
* The parent directory of this directory
*/
Expand All @@ -149,6 +151,7 @@ export declare class Prompt<Meta = {}> extends Leaf<FileTreeData<Meta>> {
get path(): string;
}
export declare class Dir<Meta = {}> extends Branch<FileTreeData<Meta>> {
readonly $$type = "dir";
/**
* The parent directory of this directory
*/
Expand All @@ -174,20 +177,24 @@ export declare function defaultComparator(a: FileTreeNode, b: FileTreeNode): num
*
* @param treeNode - A tree node
*/
export declare function isPrompt<Meta>(treeNode: FileTreeNode<Meta>): treeNode is Prompt<Meta>;
export declare function isPrompt<Meta>(treeNode: FileTreeNode<Meta>): treeNode is Prompt<Meta> & {
readonly $$type: "prompt";
};
/**
* Returns `true` if the given node is a file
*
* @param treeNode - A tree node
*/
export declare function isFile<T>(treeNode: FileTreeNode<T>): treeNode is File<T>;
export declare function isFile<Meta>(treeNode: FileTreeNode<Meta>): treeNode is File<Meta>;
/**
* Returns `true` if the given node is a directory
*
* @param treeNode - A tree node
*/
export declare function isDir<T>(treeNode: FileTreeNode<T>): treeNode is Dir<T>;
export declare type FileTreeNode<Meta = {}> = File<Meta> | Dir<Meta> | Prompt<Meta>;
export declare function isDir<Meta>(treeNode: FileTreeNode<Meta>): treeNode is Dir<Meta>;
export declare type FileTreeNode<Meta = {}> = File<Meta> | Dir<Meta> | (Prompt<Meta> & {
readonly $$type: "prompt";
});
export declare type FileTreeData<Meta = {}> = {
name: string;
meta?: Meta;
Expand Down
2 changes: 1 addition & 1 deletion types/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit df530c6

Please sign in to comment.