Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { RouteRecordRaw } from 'vue-router';
import VueBodyClass from './dist';

export = VueBodyClass;

declare class VueBodyClass {
constructor( routes: RouteRecordRaw[] );
guard( to: object, next: () => void ): void;
parseMatched( matchedArray: string[] ): string[];
findMatchInRoutesByPath( routes: RouteRecordRaw[], matchedItem: string ): boolean;
getClassForRoute( route: RouteRecordRaw ): string | null;
updateClassFromRoute( className: string, route: RouteRecordRaw ): string;
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "vue-body-class",
"version": "3.0.2",
"version": "3.0.3",
"description": "Control you body classes easily with vue-router",
"main": "./dist/index.js",
"types": "./index.d.ts",
"type": "commonjs",
"repository": {
"type": "git",
"url": "https://github.com/nikolaynesov/vue-body-class"
Expand All @@ -15,6 +17,9 @@
"class"
],
"author": "Nikolay Nesov",
"contributors": [
"Davey Jacobson <[email protected]> (https://daveyjake.dev)"
],
"license": "ISC",
"bugs": {
"url": "https://github.com/nikolaynesov/vue-body-class/issues"
Expand Down