@@ -94,9 +94,11 @@ var _ = {
94
94
clone = [ ]
95
95
visited [ id ] = clone
96
96
97
- o . forEach ( function ( v , i ) {
98
- clone [ i ] = deepClone ( v , visited )
99
- } )
97
+ ; /** @type {Array } */ ( /** @type {any } */ ( o ) ) . forEach (
98
+ function ( v , i ) {
99
+ clone [ i ] = deepClone ( v , visited )
100
+ }
101
+ )
100
102
101
103
return /** @type {any } */ ( clone )
102
104
@@ -764,52 +766,3 @@ function toArray(list) {
764
766
}
765
767
766
768
export const Prism = _
767
-
768
- // some additional documentation/types
769
-
770
- /**
771
- * The expansion of a simple `RegExp` literal to support additional properties.
772
- *
773
- * @typedef GrammarToken
774
- * @property {RegExp } pattern The regular expression of the token.
775
- * @property {boolean } [lookbehind=false] If `true`, then the first capturing group of `pattern` will (effectively)
776
- * behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.
777
- * @property {boolean } [greedy=false] Whether the token is greedy.
778
- * @property {string|string[] } [alias] An optional alias or list of aliases.
779
- * @property {Grammar } [inside] The nested grammar of this token.
780
- *
781
- * The `inside` grammar will be used to tokenize the text value of each token of this kind.
782
- *
783
- * This can be used to make nested and even recursive language definitions.
784
- *
785
- * Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into
786
- * each another.
787
- * @global
788
- * @public
789
- */
790
-
791
- /**
792
- * @typedef Grammar
793
- * @type {Object<string, RegExp | GrammarToken | Array<RegExp | GrammarToken>> }
794
- * @property {Grammar } [rest] An optional grammar object that will be appended to this grammar.
795
- * @global
796
- * @public
797
- */
798
-
799
- /**
800
- * A function which will invoked after an element was successfully highlighted.
801
- *
802
- * @callback HighlightCallback
803
- * @param {Element } element The element successfully highlighted.
804
- * @returns {void }
805
- * @global
806
- * @public
807
- */
808
-
809
- /**
810
- * @callback HookCallback
811
- * @param {Object<string, any> } env The environment variables of the hook.
812
- * @returns {void }
813
- * @global
814
- * @public
815
- */
0 commit comments