Skip to content

Commit 187c3d5

Browse files
committed
[src,spec] Rename Store{} to TypeStore{}
1 parent 6e11b3e commit 187c3d5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
CHECKS,
2121
} from './base'
2222

23-
import {Store, Ref, unref} from './store'
23+
import {TypeStore, Ref, unref} from './store'
2424

2525
export {
2626
Checkable,
@@ -37,7 +37,7 @@ export {
3737
CHECKS,
3838
ICheckable,
3939
IRule,
40-
Store,
40+
TypeStore,
4141
Ref,
4242
}
4343

src/store.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Checkable} from './base'
22

3-
export class Store {
3+
export class TypeStore {
44
private store = new Map()
55

66
add(name:string, type: Checkable) {
@@ -17,9 +17,9 @@ export class Store {
1717
}
1818

1919
export class Ref {
20-
private store: Store
20+
private store: TypeStore
2121
public readonly name:string
22-
constructor(store:Store, name:string) {
22+
constructor(store:TypeStore, name:string) {
2323
this.store = store
2424
this.name = name
2525
}

test/store.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/* global it */
33
const should = require('should')
44

5-
const {Type, Store, Ref, check} = require('..')
5+
const {Type, TypeStore: Store, Ref, check} = require('..')
66

7-
describe('Store.', function(){
8-
describe('Store()', function() {
9-
describe('Store#add(), Store#get()', function() {
7+
describe('TypeStore.', function(){
8+
describe('TypeStore()', function() {
9+
describe('TypeStore#add(), Store#get()', function() {
1010
it('Should add new rule', function() {
1111
const type = Type.string
1212

@@ -17,7 +17,7 @@ describe('Store.', function(){
1717
})
1818
})
1919

20-
describe('Store#ref()', function() {
20+
describe('TypeStore#ref()', function() {
2121
it('Should return a reference', function () {
2222
const store = new Store()
2323

0 commit comments

Comments
 (0)