From fdd233f9a5bd92175c068351107497da11bf52da Mon Sep 17 00:00:00 2001 From: Ryan Cebulko Date: Thu, 29 Apr 2021 12:28:40 -0400 Subject: [PATCH] Missing things --- build-system/test-configs/dep-check-config.js | 6 ++--- src/core/assert/assert.extern.js | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 src/core/assert/assert.extern.js diff --git a/build-system/test-configs/dep-check-config.js b/build-system/test-configs/dep-check-config.js index 6f1bd5f2747a8..d716c1c950b0c 100644 --- a/build-system/test-configs/dep-check-config.js +++ b/build-system/test-configs/dep-check-config.js @@ -506,9 +506,9 @@ exports.rules = [ filesMatching: '**/*.js', mustNotDependOn: 'src/core/assert/base.js', allowlist: [ - 'src/core/assert/dev.js', - 'src/core/assert/user.js', - 'src/log.js', + 'src/core/assert/dev.js->src/core/assert/base.js', + 'src/core/assert/user.js->src/core/assert/base.js', + 'src/log.js->src/core/assert/base.js', ], }, diff --git a/src/core/assert/assert.extern.js b/src/core/assert/assert.extern.js new file mode 100644 index 0000000000000..7d261a8f5f940 --- /dev/null +++ b/src/core/assert/assert.extern.js @@ -0,0 +1,25 @@ +/** + * Copyright 2021 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Type externs for assertions. + * @externs + */ + +/** + * @typedef {function(?, string=, ...*):?|function(?, !Array<*>)} + */ +let AssertionFunction;