Skip to content

Commit

Permalink
Hide the RegExp Object from the schema (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Feb 12, 2020
1 parent 670c3f9 commit 2c0ef64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 33 deletions.
34 changes: 2 additions & 32 deletions cspell.schema.json
Expand Up @@ -324,38 +324,8 @@
"type": "object"
},
"Pattern": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"global": {
"type": "boolean"
},
"ignoreCase": {
"type": "boolean"
},
"lastIndex": {
"type": "number"
},
"multiline": {
"type": "boolean"
},
"source": {
"type": "string"
}
},
"required": [
"source",
"global",
"ignoreCase",
"multiline",
"lastIndex"
],
"type": "object"
}
"type": [
"string"
]
},
"PatternId": {
Expand Down
5 changes: 4 additions & 1 deletion packages/cspell-lib/src/Settings/CSpellSettingsDef.ts
Expand Up @@ -217,7 +217,10 @@ export type RegExpList = PatternRef[];
/** A PatternRef is a Pattern or PatternId. */
export type PatternRef = Pattern | PatternId | PreDefinedPatterns;

export type Pattern = string | RegExp;
/** @hidden */
type InternalRegExp = RegExp

export type Pattern = string | InternalRegExp;

export type PreDefinedPatterns =
'Base64' |
Expand Down

0 comments on commit 2c0ef64

Please sign in to comment.